RFR add lworld specific value type checks to classFileParser

Karen Kinnear karen.kinnear at oracle.com
Wed Mar 21 18:48:59 UTC 2018


Thank you so much for all of these changes.Code looks good. Glad jcod worked for you.

Minor comments:
1. classFileParser.cpp line 1622 “Arrays are not flattenable” -> actually value type arrays
are always flattenable with our prototype, so perhaps “Value Type arrays are always flattenable, ACC_FLATTENABLE not allowed”
or something. Would require a change to line 7 in the test as well

2. Thanks for commenting out the <init> is not ok in a value class - could you possibly file an rfe
so we remember to clean this up when this is decided?

3. lines 4013-4016
Thank you for the comments as to why we can check flattenable_field circularity and superclass circularity 
Could you also add a comment as to why we can check flattenable_field circularity and superinterface
circularity separately? That is because interfaces can not be value types.

4. systemDictionary.cpp
  I don’t think you need to do the register_loader here - I think resolve_or_fail will do that for you - but
you can double-check with Coleen.


> On Mar 19, 2018, at 4:11 PM, harold seigel <harold.seigel at oracle.com> wrote:
> Hi,
> Please review the following webrev:
>   http://cr.openjdk.java.net/~hseigel/valueTypes_lworld.cfp.Mar19/
> The webrev adds checks to the JVM classFileParser.cpp source for the following:
>   is invalid
> * java.lang.Object is the only valid super type for value types
> * A class with ACC_VALUE must be final
> * All instance fields in an ACC_VALUE class must be marked ACC_FINAL
> * A class with ACC_VALUE cannot have a method called <init>
> * A class with ACC_VALUE cannot have any synchronized instance methods
> * A field marked ACC_FLATTENABLE cannot be an array
> Also, all ACC_FLATTENABLE fields are now pre-loaded and checked for circularity.
> (Note that the change to test ValueOops.java is just to remove a <tab> character.)
> The webrev was tested with hotspot/jtreg tests and many jdk/jtreg tests.
> Thanks, Harold

More information about the valhalla-dev mailing list