On Thu, 19 Feb 2026 19:33:16 GMT, Chen Liang <[email protected]> wrote:

>> VarHandle reflectively checks if a class has oops (and does it incorrectly 
>> by not filtering static fields). This information is easily accessible from 
>> acmp maps, and we should use that instead of spinning our custom logic.
>
> 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?

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?

-------------

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2143#discussion_r2832740449
PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2143#discussion_r2832736312

Reply via email to