RFR: 8220607 Draft JEP: Hidden Classes

Mandy Chung mandy.chung at oracle.com
Thu Dec 5 17:58:34 UTC 2019


Maurizio, thanks for reviewing.

Lambda forms are one use case.  As it's more the internals of method 
handle implementation as IR and its dependency on class data support, I 
think it's okay to leave it out.

Mandy

On 12/5/19 9:25 AM, Maurizio Cimadamore wrote:
> Hi Mandy,
> reads great - other possible use cases worth mentioning in the JEP is 
> InvokerBytecodeGenerator for lambda forms. (we also have one in the 
> memory access API, to customize memory access VarHandles).
>
> Maurizio
>
> On 05/12/2019 01:13, Mandy Chung wrote:
>> 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