RFR: 8346567: Make Class.getModifiers() non-native
Coleen Phillimore
coleenp at openjdk.org
Mon Feb 3 17:49:24 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 :)
I don't think @Stable would hurt but final should provide the same guarantee. It's set internally by the VM so there's no late setting. I don't know if this field implementation can constant fold in the case of Arrays which are (JVM_ACC_ABSTRACT | JVM_ACC_FINAL | JVM_ACC_PUBLIC).
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22652#discussion_r1880663099
More information about the serviceability-dev
mailing list