[lworld] RFR: 8373864: [lworld] Hide and rename InstanceKlassFixedBlock [v3]
Stefan Karlsson
stefank at openjdk.org
Wed Dec 17 14:09:12 UTC 2025
> Sub-classes of `InstanceKlass` can't have C++ fields because they would end up overlayed on top of the vtable and other dynamically sized sections of the `InstanceKlass` object.
>
> To handle that the `InlineKlass` has a companion class named `InlineKlassFixedBlock`, which lists all the member fields that belongs to the InlineKlass, and an instance of that gets stamped into the `InlineKlass` object after the parts that are provided by the `InstanceKlass`.
>
> I propose a few changes:
>
> 1) Move `InlineKlassFixedBlock` away from instanceKlass.hpp and place it inside inlineKlass.hpp instead.
>
> 2) Nest `InlineKlassFixedBlock` it inside `InlineKlass`. It's only `InlineKlass `(and the compilers) that touch these fields, so it doesn't have to be a public, top-level class.
>
> 3) Rename it from `InlineKlassFixedBlock` to `InlineKlass::Members`. I think that "fixed block" term is unclear and doesn't help the reader understand its role in the `InlineKlass`. Hopefully, the name `Members` is a clearer.
>
> WDYT?
Stefan Karlsson has updated the pull request incrementally with one additional commit since the last revision:
Further clarification of Members
-------------
Changes:
- all: https://git.openjdk.org/valhalla/pull/1812/files
- new: https://git.openjdk.org/valhalla/pull/1812/files/8cc3c015..5d4ee20f
Webrevs:
- full: https://webrevs.openjdk.org/?repo=valhalla&pr=1812&range=02
- incr: https://webrevs.openjdk.org/?repo=valhalla&pr=1812&range=01-02
Stats: 21 lines in 1 file changed: 17 ins; 0 del; 4 mod
Patch: https://git.openjdk.org/valhalla/pull/1812.diff
Fetch: git fetch https://git.openjdk.org/valhalla.git pull/1812/head:pull/1812
PR: https://git.openjdk.org/valhalla/pull/1812
More information about the valhalla-dev
mailing list