On Fri, 20 Feb 2026 15:55:42 GMT, Dan Heidinga <[email protected]> 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 66:
> 
>> 64:         int[] map = Unsafe.getUnsafe().getFieldMap(c);
>> 65:         int nbNonRef = map[0];
>> 66:         return nbNonRef * 2 + 1 < map.length;
> 
> This method encodes the acmp map layout in a second place in Java.  The first 
> being in ValueObjectMethods.  Rather than propagating this encoding, can we 
> move this method to ValueObjectMethods so the encoding is kept in one place?

Unfortunately, `ValueObjectMethods` is package-private in `java.lang.runtime` 
and must not be exported to the public. To consolidate uses of the acmp map, we 
might have to move `ValueObjectMethods` elsewhere so 
`jdk.internal.value.ValueClass` can access its without VOM being exported to 
the public.

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

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

Reply via email to