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).

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

Commit messages:
 - Fixed from StefanK feedback
 - Fix naturally atomic policy

Changes: https://git.openjdk.org/valhalla/pull/2361/files
  Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=2361&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8382941
  Stats: 66 lines in 6 files changed: 58 ins; 0 del; 8 mod
  Patch: https://git.openjdk.org/valhalla/pull/2361.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/2361/head:pull/2361

PR: https://git.openjdk.org/valhalla/pull/2361

Reply via email to