[lworld] RFR: 8371915: [lworld] LayoutKind enum should have helper methods [v2]

Frederic Parain fparain at openjdk.org
Thu Nov 20 20:32:30 UTC 2025


On Thu, 20 Nov 2025 19:10:20 GMT, Dan Heidinga <heidinga at openjdk.org> wrote:

>> Frederic Parain has updated the pull request incrementally with one additional commit since the last revision:
>> 
>>   Fix ArrayProperties for NULLABLE_ATOMIC_FLAT
>
> src/hotspot/share/oops/arrayKlass.hpp line 42:
> 
>> 40:  public:
>> 41:   enum ArrayProperties : uint32_t {
>> 42:     DEFAULT         = 0,          // NULLABLE and ATOMIC
> 
> Does DEFAULT also apply to arrays of oops?  The name "DEFAULT" is slightly concerning if we're only talking about non-oop cases.  I'd be tempted to call this NULLABLE_ATOMIC rather than DEFAULT

An array of oops (non-flat array) can be either DEFAULT or NULL_RESTRICTED.
DEFAULT is far from a perfect name, but it tries to reflect the fact that it is the semantic properties of arrays users get by default when creating an array, without using any special array creation API.

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/1745#discussion_r2547579177


More information about the valhalla-dev mailing list