[lworld] [Rev 01] RFR: JDK-8243204 add class load time checking of abstract super classes of…
Frederic Parain
fparain at openjdk.java.net
Thu May 7 18:11:11 UTC 2020
On Thu, 7 May 2020 15:29:45 GMT, Harold Seigel <hseigel 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.
>
> Harold Seigel has updated the pull request with a new target base due to a merge or a rebase. The pull request now
> contains three commits:
> - Merge branch 'lworld' into abstractSuper
> - JDK-8243204 add class load time checking of abstract super classes of inline type
> - JDK-8243204 add class load time checking of abstract super classes of inline types
src/hotspot/share/oops/instanceKlass.hpp line 262:
> 261: bool _invalid_inline_super; // if true, invalid super type for an inline type.
> 262: bool _invalid_identity_super; // if true, invalid super type for an identity type.
> 263:
Would it be possible to use two bits from `_misc_flags` instead of adding two bool fields to `InstanceKlass`?
src/hotspot/share/classfile/classFileParser.cpp line 6931:
> 6930: return false;
> 6931: }
> 6932:
It seems this method could be made static.
src/hotspot/share/classfile/classFileParser.cpp line 6904:
> 6903: // does not implement interface java.lang.IdentityObject (checked elsewhere), has
> 6904: // an empty body-less no-arg constructor, and no synchronized instance methods.
> 6905: bool ClassFileParser::is_invalid_super_for_inline_type(const InstanceKlass* ik) {
The comment should be more explicit about the fact that it is performing a local test, without considering super types.
The final decision taking account super types being performed in `fill_instance_klass()`.
-------------
PR: https://git.openjdk.java.net/valhalla/pull/34
More information about the valhalla-dev
mailing list