On Fri, 24 Apr 2026 12:06:36 GMT, Joel Sikström <[email protected]> wrote:

>> Frederic Parain has updated the pull request incrementally with one 
>> additional commit since the last revision:
>> 
>>   Comment hard coded arguments to is_naturally_aotimic()
>
> src/hotspot/share/classfile/fieldLayoutBuilder.cpp line 82:
> 
>> 80:     assert(field_info.access_flags().is_strict(), "null-free fields must 
>> be strict");
>> 81:     if (vk->must_be_atomic() || AlwaysAtomicAccesses) {
>> 82:       if (vk->is_naturally_atomic(true) && 
>> vk->has_null_free_non_atomic_layout()) return 
>> LayoutKind::NULL_FREE_NON_ATOMIC_FLAT;
> 
> It's a bit hard to know what the true here means from first glance. Maybe we 
> can add comments to the plain boolean calls?
> 
> Suggestion:
> 
>       if (vk->is_naturally_atomic(true /* null_free */) && 
> vk->has_null_free_non_atomic_layout()) return 
> LayoutKind::NULL_FREE_NON_ATOMIC_FLAT;

Fixed.

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

PR Review Comment: 
https://git.openjdk.org/valhalla/pull/2361#discussion_r3137988588

Reply via email to