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 ------------- Commit messages: - Restructure reflective access flag parsing Changes: https://git.openjdk.org/jdk/pull/30248/files Webrev: https://webrevs.openjdk.org/?repo=jdk&pr=30248&range=00 Issue: https://bugs.openjdk.org/browse/JDK-8380076 Stats: 424 lines in 10 files changed: 214 ins; 184 del; 26 mod Patch: https://git.openjdk.org/jdk/pull/30248.diff Fetch: git fetch https://git.openjdk.org/jdk.git pull/30248/head:pull/30248 PR: https://git.openjdk.org/jdk/pull/30248
