Hidden classes + class data

Mandy Chung mandy.chung at oracle.com
Wed Nov 27 01:30:57 UTC 2019

On 11/26/19 4:55 PM, John Rose wrote:
> On Nov 26, 2019, at 3:03 PM, forax at univ-mlv.fr wrote:
>> I wonder if defineHiddenClassWithClassData should not take another class as parameter instead of a byte array (using the byte array of that class) enabling more sharing of the bytecode and allowing to do the  verification only once if defineHiddenClassWithClassData is called several times with the same Class.
> Yes.  I’d like to try this with templates, when we get them, since
> templates are supposed to share metadata with their species.
> E.g., for a lambda form of a predefined shape with 2 free variables
> (a type and a MH), define it as a template with those parameters
> and inject it as many times as you see distinct combinations of
> those parameters.

This produces a distinct Class mirror for each hidden class defined from 
the same metadata (class bytes) with a different class data.

Perhaps we can experiment ClassDefiner builder-like API.   I will 
explore this.


More information about the valhalla-dev mailing list