[lworld] RFR: 8378273: [lworld] Use acmp map to detect oops for VarHandle [v3]
Paul Hübner
phubner at openjdk.org
Mon Feb 23 08:47:43 UTC 2026
On Sun, 22 Feb 2026 05:38:28 GMT, Chen Liang <liach at openjdk.org> wrote:
>> src/java.base/share/classes/jdk/internal/value/ValueClass.java line 58:
>>
>>> 56:
>>> 57: /// {@return whether the flat layout for fields of this type contains references}
>>> 58: /// Returns true if there is no flat layout for fields of the given type.
>>
>> Confirming, will return true for an identityClass with only primitive fields?
>> The `hasOops` name might need to be more descriptive of the cases for an arbitrary class.
>
> No, if there's a field of an identityClass type in another class, that field is always laid out as a reference.
There might be an opportunity to strengthen the language even more:
{@return whether the flat layout for fields of this type contains references}
/// Returns true if there is no flat layout for fields of the given type.
-->
{@return whether fields of the given class, when using a flat layout, contain oops}
/// Returns true if the given class there is no flat layout.
A possible more descriptive name of the method could be `flatFieldHasOops`.
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/2143#discussion_r2839656347
More information about the valhalla-dev
mailing list