RFR: 8341260: Add Float16 to jdk.incubator.vector [v11]
Paul Sandoz
psandoz at openjdk.org
Wed Nov 13 19:10:17 UTC 2024
On Wed, 13 Nov 2024 06:40:15 GMT, Joe Darcy <darcy at openjdk.org> wrote:
>> src/jdk.incubator.vector/share/classes/jdk/incubator/vector/Float16.java line 91:
>>
>>> 89: // JEP-401 (https://openjdk.org/jeps/401).
>>> 90: // @jdk.internal.MigratedValueClass
>>> 91: // @jdk.internal.ValueBased
>>
>> Please uncomment value-based class annotation.
>> Float16 does comply with the semantics of value-based classes.
>> https://docs.oracle.com/en/java/javase/22/docs/api/java.base/java/lang/doc-files/ValueBased.html
>
> The jdk.internal.ValueBased annotation is not exported for use outside of the java.base module.
We can do this in a subsequent PR and export the package `jdk.internal` to module `jdk.incubating.vector` like we do for other `java.base` internal packages. I believe no other changes should be necessary, but we should double check.
Classes in the `jdk.incubating.vector` module are loaded in the boot class loader and are considered privileged, therefore the internal `@ValueBased` annotation will not be ignored by the runtime.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/21574#discussion_r1841020576
More information about the core-libs-dev
mailing list