[lworld] RFR: 8327636: [lworld] Make primitive wrappers be value class if preview feature is enabled [v2]
Chen Liang
liach at openjdk.org
Fri Mar 8 04:32:59 UTC 2024
On Fri, 8 Mar 2024 03:22:12 GMT, Mandy Chung <mchung at openjdk.org> wrote:
>> As specified in JEP 401, when preview features are enabled, the following standard library classes are considered to be value classes:
>>
>> java.lang.Byte
>> java.lang.Short
>> java.lang.Integer
>> java.lang.Long
>> java.lang.Float
>> java.lang.Double
>> java.lang.Boolean
>> java.lang.Character
>> java.util.Optional
>> java.lang.Number
>> java.lang.Record
>>
>>
>> These value classes are loaded only if --enable-preview is set. All valhalla tests should have preview enabled to ensure testing with the proper set of library classes.
>>
>> Testing: Run `jdk_valhalla` and `hotspot_valhalla_runtime` with `-Xint` with and without `--enable-preview`. The result is pretty good. [JDK-8327637](https://bugs.openjdk.org/browse/JDK-8327637) and [JDK-8327639](https://bugs.openjdk.org/browse/JDK-8327639) need further investigation.
>
> Mandy Chung has updated the pull request incrementally with one additional commit since the last revision:
>
> Removed duplicated Record
src/java.base/share/classes/sun/invoke/util/VerifyAccess.java line 212:
> 210:
> 211: // exports are not setup during early VM initialization
> 212: if (!jdk.internal.misc.VM.isModuleSystemInited()) {
Should we merge this and the `lookupModule == null` early startup cases, and `assert lookupModule == refModule && refModule == Object.class.getModule()` can become `assert lookupModule == refModule && (refModule == null || refModule == Object.class.getModule())`?
-------------
PR Review Comment: https://git.openjdk.org/valhalla/pull/1040#discussion_r1517152683
More information about the valhalla-dev
mailing list