RFR: 8346567: Make Class.getModifiers() non-native

Dan Heidinga heidinga at openjdk.org
Mon Feb 3 17:49:25 UTC 2025


On Wed, 11 Dec 2024 15:06:54 GMT, Viktor Klang <vklang at 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


More information about the serviceability-dev mailing list