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

Frederic Parain fparain at openjdk.org
Fri Jan 16 14:04:41 UTC 2026


On Wed, 14 Jan 2026 20:12:01 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:

> Should this be nullable_non_atomic_alignment() ? Or is it the same alignment as null_free_non_atomic_alignment? (if so pls comment why)

Nullable non-atomic layouts have the same alignment constraint as null_free_non_atomic layouts.
Null-free non atomic layouts have an alignment constraint based on the constraints of individual fields inside the layout. The addition of the null marker, which is currently encoded with a byte, just adds the weakest alignment constraint to the set of constraints to be considered, so it has no effect, and the end results for nullable-non-atomic layouts is the same as for null-free-non-atomic layouts.

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/1407#discussion_r2698632128


More information about the valhalla-dev mailing list