RFR add lworld specific value type checks to classFileParser

harold seigel harold.seigel at oracle.com
Mon Mar 19 20:11:45 UTC 2018


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:

  * A class with ACC_VALUE and ACC_INTERFACE or ACC_ABSTRACT or ACC_ENUM
    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