RFR: 8351565: Implement JEP 502: Stable Values (Preview)

Chen Liang liach at openjdk.org
Thu Mar 13 11:20:10 UTC 2025


On Mon, 10 Mar 2025 18:11:23 GMT, Per Minborg <pminborg at openjdk.org> wrote:

> Implement JEP 502.
> 
> The PR passes tier1-tier3 tests.

FYI we don't usually drop the benchmark scores in the PR description; we usually leave them in comments to indicate which revision the bench results apply to.

src/hotspot/share/ci/ciField.cpp line 255:

> 253: static bool trust_final_non_static_fields_of_type(Symbol* signature) {
> 254:   return signature == vmSymbols::java_lang_StableValue_signature() ||
> 255:          signature == vmSymbols::java_lang_StableValue_array_signature();

This is dubious - a user can declare a `final StableValue[] array;` and modify the array elements, which is totally compliant to the language and the VM rules. Don't know what this serves.

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

PR Comment: https://git.openjdk.org/jdk/pull/23972#issuecomment-2711648215
PR Review Comment: https://git.openjdk.org/jdk/pull/23972#discussion_r1987920134


More information about the compiler-dev mailing list