RFR: 8364187: Make getClassAccessFlagsRaw non-native
Chen Liang
liach at openjdk.org
Mon Jul 28 22:00:59 UTC 2025
On Mon, 28 Jul 2025 20:14:15 GMT, Coleen Phillimore <coleenp at openjdk.org> wrote:
> This change removes the intrinsic for getClassAccessFlagsRaw for reflection and initializes an rawAccessFlags field in java.lang.Class instead, that Java code can non-natively access.
> Tested with tier1-4.
src/java.base/share/classes/java/lang/Class.java line 1012:
> 1010: private transient Object[] signers; // Read by VM, mutable
> 1011: private final transient char modifiers; // Set by the VM
> 1012: private final transient char rawAccessFlags; // Set by the VM
I suggest `classFileFlags` in the spirit of `getClassFileVersion` - this is the flag on the JVMS 4 `ClassFile` structure, while the `modifiers` can be alternatively from `InnerClasses` attribute.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/26517#discussion_r2237933184
More information about the core-libs-dev
mailing list