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

Roger Riggs rriggs at openjdk.org
Wed Dec 6 16:03:57 UTC 2023


On Tue, 5 Dec 2023 19:57:56 GMT, Mandy Chung <mchung at openjdk.org> wrote:

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

make/data/hotspot-symbols/symbols-unix line 140:

> 138: JVM_GetTemporaryDirectory
> 139: JVM_GetVmArguments
> 140: JVM_GetZeroInstance

The naming of ZeroInstance and ImplicitlyConstructableClass could be more closely aligned.
Perhaps GetImplicitlyConstructedInstance.

src/hotspot/share/classfile/javaClasses.hpp line 1304:

> 1302:     MN_HIDDEN_MEMBER         = 0x00400000, // @Hidden annotation detected
> 1303:     MN_FLAT_FIELD            = 0x00800000, // flat field
> 1304:     MN_NULL_RESTRICTED_FIELD = 0x01000000, // null-restricted fiel

typo in comment:  "fiel".

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

PR Review Comment: https://git.openjdk.org/valhalla/pull/960#discussion_r1417546559
PR Review Comment: https://git.openjdk.org/valhalla/pull/960#discussion_r1417532212



More information about the valhalla-dev mailing list