[lworld] RFR: 8374800: [lworld] Add a NULLABLE_NON_ATOMIC_FLAT layout

Quan Anh Mai qamai at openjdk.org
Sat Jan 10 11:50:01 UTC 2026


On Mon, 24 Mar 2025 20:49:25 GMT, Frederic Parain <fparain at openjdk.org> 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


More information about the valhalla-dev mailing list