-
Bug
-
Resolution: Unresolved
-
P4
-
repo-valhalla
The jdk-25+21 merge brought in JDK-8297271 "AccessFlag.maskToAccessFlags should be specific to class file version"
Valhalla appears to have some further work to do here. Current state:
1) jdk/classfile/AdvancedTransformationsTest.java fails with: "java.lang.IllegalArgumentException: Unmatched bit position 0x20 for location INNER_CLASS"
2) tools/javap/T4975569.java fails with: "Error: Access Flags: Unmatched bit position 0x20 for location INNER_CLASS"
Problem listings these for now.
AccessFlag.java appears to contain some discrepancies when it comes to inner class allowing SUPER. It appears Valhalla uses SUPER in SET_CLASS_INNER_CLASS (location set), but that is not so in mainline. Doesn't mention in super in inner class in JEP401 (just IDENTITY, which of course == ACC_SUPER).
INNER_CLASS was declared with IDENTITY or SUPER, was tweaked back (during merge) to "if preview() then IDENTITY" (not "else SUPER"). Otherwise java/lang/reflect/AccessFlag/VersionedLocationsTest.java would fail.
It appears java/lang/reflect/AccessFlag/VersionedLocationsTest.java needs to be run with and without @enablePreview.
I don't believe the current version checking uses minor (aka preview), so it is difficult to map IDENTITY with "latest version + preview" vs "latest version". So correctly allowing IDENTITY for preview but not previous releases is not currently possible
...it is entirely possible further (yet merged) changes resolve some of this ?
Valhalla appears to have some further work to do here. Current state:
1) jdk/classfile/AdvancedTransformationsTest.java fails with: "java.lang.IllegalArgumentException: Unmatched bit position 0x20 for location INNER_CLASS"
2) tools/javap/T4975569.java fails with: "Error: Access Flags: Unmatched bit position 0x20 for location INNER_CLASS"
Problem listings these for now.
AccessFlag.java appears to contain some discrepancies when it comes to inner class allowing SUPER. It appears Valhalla uses SUPER in SET_CLASS_INNER_CLASS (location set), but that is not so in mainline. Doesn't mention in super in inner class in JEP401 (just IDENTITY, which of course == ACC_SUPER).
INNER_CLASS was declared with IDENTITY or SUPER, was tweaked back (during merge) to "if preview() then IDENTITY" (not "else SUPER"). Otherwise java/lang/reflect/AccessFlag/VersionedLocationsTest.java would fail.
It appears java/lang/reflect/AccessFlag/VersionedLocationsTest.java needs to be run with and without @enablePreview.
I don't believe the current version checking uses minor (aka preview), so it is difficult to map IDENTITY with "latest version + preview" vs "latest version". So correctly allowing IDENTITY for preview but not previous releases is not currently possible
...it is entirely possible further (yet merged) changes resolve some of this ?
- is blocked by
-
JDK-8355536 Create version constants to model preview language and vm features
-
- Open
-
- relates to
-
JDK-8297271 AccessFlag.maskToAccessFlags should be specific to class file version
-
- Resolved
-