RFR: 8220607 Draft JEP: Hidden Classes
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.
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).
> On 05/12/2019 01:13, Mandy Chung wrote:
>> Draft JEP:
>> The past discussion was tracked in JDK-8171335  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:
>> The current prototype is in the nestmates branch and all JDK use of
>> Unsafe::defineAnonymousClass are replaced with hidden classes .
>>  https://bugs.openjdk.java.net/browse/JDK-8171335
>>  https://bugs.openjdk.java.net/browse/JDK-8230501
More information about the valhalla-dev