[lworld] RFR: JDK-8243204 add class load time checking of abstract super classes of…

Harold Seigel hseigel at openjdk.java.net
Thu May 7 15:39:22 UTC 2020

On Mon, 4 May 2020 21:25:01 GMT, Frederic Parain <fparain at openjdk.org> wrote:

>> Please review this chagne.  It adds checks of super classes of inline classes.  It checks that an inline class's super
>> class is  either java.lang.Object or an abstract class.  And, if abstract, checks that the super, and its super, etc.
>> do not have instance fields, nor synchronized instance methods, or non-empty constructors, nor constructors with args.
>> The fix was tested with tiers 1 - 3.
> Shouldn't `ClassFileParser::check_super_of_inline_type()` also check that no super classes implement the
> `java.lang.IdentityObject` interface?

The update to the pull request implements John's "bit A and bit B" idea posted in the java-valhalla slack channel.
Instead of A and B, the flags are named invalid_inline_super and invalid_identity_super.  In this pull request,
invalid_identity_super exists but is never set nor read.  That is for a future change.

Flag invalid_inline_super is set to TRUE in a class's InstanceKlass, if, at class load time, the class is determined to
be an invalid super class for an inline type.

Checking that the class's constructor is abstract will be done at a future date once there is compiler support.


PR: https://git.openjdk.java.net/valhalla/pull/34

More information about the valhalla-dev mailing list