On Fri, 13 Mar 2026 23:41:19 GMT, Chen Liang <[email protected]> wrote:

>> Currently, the access flags in core reflection are parsed through a central 
>> factory that dispatches through ReflectionFactory, which examines the 
>> location plus the class file format version, so that if a Method has STRICT, 
>> we call AccessFlag.maskToAccessFlag with the right class file format version 
>> so we do not fail on encountering STRICT.
>> 
>> After recent studies in project Valhalla, we noticed that Hotspot has a 
>> uniform representation of access flags for all class file versions. This 
>> means that if we can avoid passing the ClassFileVersion complexities and 
>> just parse based on the uniform representation Hotspot recognizes.
>> 
>> This change requires moving the AccessFlagSet to jdk.internal so it could be 
>> accessed by parsers. But we can remove the JavaLangAccess backdoor to fetch 
>> the class file versions.
>> 
>> Also see the companion Valhalla PR: 
>> https://github.com/openjdk/valhalla/pull/2209
>> 
>> ---------
>> - [ ] I confirm that I make this contribution in accordance with the 
>> [OpenJDK Interim AI Policy](https://openjdk.org/legal/ai).
>
> Chen Liang has updated the pull request incrementally with one additional 
> commit since the last revision:
> 
>   Copyright years

Moving to #31123.

-------------

PR Comment: https://git.openjdk.org/jdk/pull/30248#issuecomment-4635898128

Reply via email to