1. `weakCompareAndSetReferenceXxx` in `Unsafe` were delegating to wrong methods
2. Replace use of `0` for reference layout with `Unsafe.NON_FLAT_LAYOUT`
3. Replace use of `31 - Integer.numberOfLeadingZeros(ascale)` with 
`numberOfTrailingZeros`
4. Remove null check for VarHandle getting from NR fields (parity with 
ArrayVarHandle and DirectMethodHandle), add missing null check for flat value 
var handles
5. Remove the weird directives and old flags of RecursiveValueClass

Thanks to @JornVernee and @AlanBateman for spotting these issues.

---------
- [x] I confirm that I make this contribution in accordance with the [OpenJDK 
Interim AI Policy](https://openjdk.org/legal/ai).

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

Commit messages:
 - Redundant whitespace
 - Changes from review comments etc.

Changes: https://git.openjdk.org/valhalla/pull/2576/files
  Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=2576&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8387192
  Stats: 103 lines in 6 files changed: 10 ins; 59 del; 34 mod
  Patch: https://git.openjdk.org/valhalla/pull/2576.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/2576/head:pull/2576

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

Reply via email to