[lworld] RFR: 8321039: [lworld] Substitutability code must recognize new annotations

Mandy Chung mchung at openjdk.org
Tue Dec 5 21:43:22 UTC 2023


An initial implementation for substitutability test and partial method handle and var handle support for null-restricted types. JDK-8317767 will provide the full library support for null-restricted types.    

This patch handles null-restricted field reference declared in a non-flat class.  The default value of that field is lazily set by VM on read access.  `Unsafe::getReference` may return null for null-restricted non-flat field.  

A new `jdk.internal.value.ValueClass` is created to provide JVM entry points for value classes until public APIs are defined.     `jdk.internal.misc.newNullRestrictedArray` method is moved as well.

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

Commit messages:
 - fix whitespace
 - null-restricted check not needed for VarhandleValues
 - clean up
 - Initial support of null-restricted field substitutability test

Changes: https://git.openjdk.org/valhalla/pull/960/files
 Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=960&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8321039
  Stats: 489 lines in 32 files changed: 350 ins; 36 del; 103 mod
  Patch: https://git.openjdk.org/valhalla/pull/960.diff
  Fetch: git fetch https://git.openjdk.org/valhalla.git pull/960/head:pull/960

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



More information about the valhalla-dev mailing list