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

Frederic Parain fparain at openjdk.org
Thu Nov 20 19:13:51 UTC 2025


On Wed, 19 Nov 2025 21:56:24 GMT, Frederic Parain <fparain at openjdk.org> wrote:

>> src/hotspot/share/oops/arrayKlass.cpp line 231:
>> 
>>> 229:     break;
>>> 230:     case LayoutKind::NULLABLE_ATOMIC_FLAT:
>>> 231:       props = ArrayKlass::ArrayProperties::NON_ATOMIC;
>> 
>> Why does NULLABLE_ATOMIC_FLAT produce NON_ATOMIC?  Something, maybe just naming?, seems off here.
>> 
>> I know this is a refactoring of existing code and so has the same meaning but it doesn't make sense to me
>
> Good catch!
> I've copied/pasted this code when refactoring without verifying it.
> It doesn't make sense to me either.
> For LayoutKind::NULLABLE_ATOMIC_FLAT the method should return ArrayKlass::ArrayProperties::DEFAULT.
> Let me fix this and run some tests.

No issue detected by testing.

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

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


More information about the valhalla-dev mailing list