On Wed, 11 Dec 2024 15:06:54 GMT, Viktor Klang <vkl...@openjdk.org> wrote:
>> I don't think this needs to be stable - finals in java.lang is trusted by >> the JIT compiler. > > Yeah, I was just thinking whether something set from inside the VM which is > marked @Stable is constant-folded :) @viktorklang-ora `@Stable` is not about how the field was set, but about the JIT observing a non-default value at compile time. If it observes a non-default value, it can treat it as a compile time constant. ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/22652#discussion_r1880692608