On Fri, 13 Mar 2026 23:28:20 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).

This pull request has been closed without being integrated.

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

PR: https://git.openjdk.org/jdk/pull/30248

Reply via email to