On Mon, 24 Mar 2025 20:49:25 GMT, Frederic Parain <[email protected]> wrote:

> Strict final instance fields are not subject to concurrent writes during a 
> read access, so they can be flattened even if they are nullable and bigger 
> than 64 bits. The NULLABLE_NON_ATOMIC_FLAT layout is added for this 
> particular case.
> This new layout can also be used in the special case of nullable empty value 
> classes, because their payload contains a single entry, the null-marker, 
> which is naturally atomic.

I assume this PR is for flattening of nullable fields at immutable memory 
(strict final fields) only. But I think the same flattening can be done for 
null-free field, right?

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

PR Comment: https://git.openjdk.org/valhalla/pull/1407#issuecomment-3732500553

Reply via email to