[lworld] RFR: 8327636: [lworld] Make primitive wrappers be value class if preview feature is enabled
Chen Liang
liach at openjdk.org
Fri Mar 8 02:07:01 UTC 2024
On Thu, 7 Mar 2024 22:45:41 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.
https://bugs.openjdk.org/browse/JDK-8327481 can be closed as a duplicate of this.
make/modules/java.base/gensrc/GensrcValueClasses.gmk line 39:
> 37: java/lang/Character.java \
> 38: java/lang/Number.java \
> 39: java/lang/Record.java \
Record is already included in the end of the list.
-------------
PR Review: https://git.openjdk.org/valhalla/pull/1040#pullrequestreview-1923896364
PR Review Comment: https://git.openjdk.org/valhalla/pull/1040#discussion_r1517073698
More information about the valhalla-dev
mailing list