RFR: 8220607 Draft JEP: Hidden Classes

Mandy Chung mandy.chung at oracle.com
Thu Dec 5 01:13:25 UTC 2019


Draft JEP:
   https://bugs.openjdk.java.net/browse/JDK-8220607

The past discussion was tracked in JDK-8171335 [1] regarding dynamic 
nestmates and the replacement of Unsafe::defineAnonymousClass which 
consists of four separable features:
1. non-discoverable and cannot participate in symbolic resolution
2. lifecycle is independent of its defining class loader
3. private member access of the given host class
4. constant pool patching

The JEP proposes to support a new kind of classes: "hidden classes" that 
can optionally join as a member of a nest and/or can be weakly 
referenced by its defining class loader. It covers 1-3 above.   4 is 
separated from this JEP to give time to explore the class data support 
that may benefit to prototype with template classes.

javadoc and specdiff:
http://cr.openjdk.java.net/~mchung/valhalla/webrevs/hidden-classes/api/
http://cr.openjdk.java.net/~mchung/valhalla/webrevs/hidden-classes/specdiff/

The current prototype is in the nestmates branch and all JDK use of 
Unsafe::defineAnonymousClass are replaced with hidden classes [3].

thanks
Mandy
[1] https://bugs.openjdk.java.net/browse/JDK-8171335
[2] https://bugs.openjdk.java.net/browse/JDK-8230501
[3] 
http://cr.openjdk.java.net/~mchung/valhalla/webrevs/hidden-classes/webrev.12-03-2019/



More information about the valhalla-dev mailing list