[lworld] RFR: 8295234: [lworld] inner class of older classfile versions is not recognized as identity class

Mandy Chung mchung at openjdk.org
Fri Oct 14 00:18:00 UTC 2022


The modifiers of an inner class uses the access flags in the `InnerClasses`  attribute.   An inner class with an older class file version does not have `ACC_IDENTITY` flag set.   Instead of having `Class::isIdentity`  to depend on `getModifiers()`, this PR proposes to make `Class::isIdentity` a native method implemented by the VM. In addition, `Class::isIdentity` can be made as intrinsics.

I leave `Class::isValue` as is.   A value class must have `ACC_VALUE` flag set.   `Class::getModifiers` is already intrinsified.   We can revisit this in the future when there is a need to make it as a native VM method.

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

Commit messages:
 - 8295234: [lworld] inner class of older bytecode versions is not recognized as identity class

Changes: https://git.openjdk.org/valhalla/pull/794/files
 Webrev: https://webrevs.openjdk.org/?repo=valhalla&pr=794&range=00
  Issue: https://bugs.openjdk.org/browse/JDK-8295234
  Stats: 25 lines in 5 files changed: 18 ins; 6 del; 1 mod
  Patch: https://git.openjdk.org/valhalla/pull/794.diff
  Fetch: git fetch https://git.openjdk.org/valhalla pull/794/head:pull/794

PR: https://git.openjdk.org/valhalla/pull/794



More information about the valhalla-dev mailing list