[lworld] RFR: 8378273: [lworld] Use acmp map to detect oops for VarHandle [v2]
Chen Liang
liach at openjdk.org
Fri Feb 20 13:04:28 UTC 2026
On Fri, 20 Feb 2026 11:22:35 GMT, Paul Hübner <phubner at openjdk.org> wrote:
>> Chen Liang has updated the pull request incrementally with one additional commit since the last revision:
>>
>> interface-typed fields were using atomic flat VHs ???
>
> src/java.base/share/classes/jdk/internal/value/ValueClass.java line 62:
>
>> 60: // non-concrete value class always a pointer
>> 61: if (!ValueClass.isConcreteValueClass(c))
>> 62: return !c.isPrimitive();
>
> What about primitive arrays?
A field of an array type can be never a flat value.
> test/jdk/valhalla/valuetypes/ValueClassCompatibilityTest.java line 106:
>
>> 104: hasOopsCase(true, String.class, "final identity class");
>> 105: hasOopsCase(true, Comparable.class, "interface");
>> 106: hasOopsCase(true, int[].class, "array class");
>
> I'm not following. How does/can a primitive `int[]` contain oops?
A field `int[] a` is a reference, never flat.
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/2143#discussion_r2833095184
PR Review Comment: https://git.openjdk.org/valhalla/pull/2143#discussion_r2833092267
More information about the valhalla-dev
mailing list