RFR: 8346567: Make Class.getModifiers() non-native
    Viktor Klang 
    vklang at openjdk.org
       
    Mon Feb  3 17:49:24 UTC 2025
    
    
  
On Wed, 11 Dec 2024 14:52:48 GMT, Chen Liang <liach at openjdk.org> wrote:
>> src/java.base/share/classes/java/lang/Class.java line 1006:
>> 
>>> 1004:     private final transient int modifiers;  // Set by the VM
>>> 1005: 
>>> 1006:     // package-private
>> 
>> @coleenp Could this field be @Stable, or does that only apply to `putfield`s?
>
> 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 :)
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/22652#discussion_r1880374750
    
    
More information about the serviceability-dev
mailing list