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

Per Minborg pminborg at openjdk.org
Thu Mar 13 11:20:11 UTC 2025


On Mon, 10 Mar 2025 19:45:53 GMT, Chen Liang <liach at openjdk.org> wrote:

>> Implement JEP 502.
>> 
>> The PR passes tier1-tier3 tests.
>
> 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.

Fair comment. We should at least remove the array signature.

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

PR Review Comment: https://git.openjdk.org/jdk/pull/23972#discussion_r1988609781


More information about the core-libs-dev mailing list