On Fri, 30 Jan 2026 09:14:56 GMT, Quan Anh Mai <[email protected]> wrote:

>> Hi,
>> 
>> This PR implements the support of `NULLABLE_NON_ATOMIC_FLAT` layout in the 
>> JITs. There is nothing to do in C2. In C1, I need to implement 
>> loading/storing nullable value of a non-atomic field.
>> 
>> The test `TestValueClasses` is failing with `-XX:-TieredCompilation`, which 
>> I suspect is due to the substitutability test handling padding bytes 
>> incorrectly.
>> 
>> Please kindly review what there are for now, thanks a lot.
>
> Quan Anh Mai has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   add assert

src/hotspot/share/ci/ciField.hpp line 189:

> 187:   // accessed in a non-atomic manner. This method must not depend on the 
> fact that the field cannot
> 188:   // be accessed racily (e.g. it is a strict final field), as if the 
> holder object is flattened
> 189:   // as a field that is not strict final, this property is lost.

Thank you for this comment which makes this tricky point explicit.
Question about C2 though, let's consider an identity object with a strict final 
field that is flattened using the NULLABLE_NON_ATOMIC_FLAT layout, will C2 
consider the fields inside the flat field as constants?

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/1970#discussion_r2746818022

Reply via email to