On Thu, 23 Apr 2026 19:34:48 GMT, Frederic Parain <[email protected]> wrote:

> Fixes in the logic to determine if a value class is naturally atomic or not. 
> The previous implementation incorrectly considered values classes with a 
> single non-empty nullable field as being naturally atomic.
> Also includes improvements to the InstanceKlass::is_naturally_atomic() to 
> prevent bad usages.
> 
> Tested locally.
> More testing in progress on Mach5 (tiers 1-4).
> 
> 
> 
> ---------
> - [X] I confirm that I make this contribution in accordance with the [OpenJDK 
> Interim AI Policy](https://openjdk.org/legal/ai).

The changes look good, thank you! I agree with Stefan's suggestion on making it 
more readable. I would prefer to have a test case where we exercise that an 
empty value is naturally atomic, so we cover both branches of 
`InstanceKlass::is_naturally_atomic` explicitly. I'm not sure if that is 
covered by other tests already, or if it could be added to `test_9`.

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

Marked as reviewed by phubner (Committer).

PR Review: 
https://git.openjdk.org/valhalla/pull/2361#pullrequestreview-4169511858

Reply via email to