RFR: 8362376: Use @Stable annotation in Java FDLIBM implementation
John R Rose
jrose at openjdk.org
Wed Jul 16 18:34:39 UTC 2025
On Wed, 16 Jul 2025 04:53:04 GMT, Joe Darcy <darcy at openjdk.org> wrote:
> Add `@Stable` to the static final arrays used in the Java port of FDLIBM.
The effect of this PR is to make the affected array elements eligible for constant-folding by the JIT.
The contract of `@Stable` is private to the JDK, since it is a trusted annotation. The trusted user promises not to change the array elements after the JIT might have observed them.
If we had a frozen (immutable) array feature in the JVM this PR could be formulated using frozen array constants. But we are not there yet.
-------------
PR Comment: https://git.openjdk.org/jdk/pull/26341#issuecomment-3079816223
More information about the core-libs-dev
mailing list