Review Request: JDK-8185148: [MVT] Class.java's isValueClass causes all non-MVT enabled JVM executions to have an InstanceKlass created for __Value reference

Mandy Chung mandy.chung at oracle.com
Fri Jul 28 14:26:22 UTC 2017


One thing to mention:

LambdaType.BasicType Q_TYPE:
   Q_TYPE('Q', MinimalValueTypes_1_0.getValueClass(), Wrapper.OBJECT), 

If value type is not enabled, Q_TYPE would have a null basic type Class.
I expect Q_TYPE should not be used in that case.  Do you see any issue?
Mandy

> On Jul 28, 2017, at 5:28 AM, Maurizio Cimadamore <maurizio.cimadamore at oracle.com> wrote:
> 
> Looks great - thanks!
> 
> Maurizio
> 
> 
> On 28/07/17 05:56, Mandy Chung wrote:
>> A class referencing java.lang.__Value would fail verification when value type is not enabled.  Class::isValueType and MinimalValueTypes_1_0::getValueType both references java.lang.__Value but they may be loaded when value type is not enabled.  VerifyError that Tobias has ran into [1] is related to this issue.
>> 
>> A simple fix is to refactor the reference to java.lang.__Value in a separate class that will only be loaded when -XX:+EnableMVT and —XX:+EnableValhalla is set.  We may look into a cleaner fix in the future.
>> 
>> Webrev:
>>   http://cr.openjdk.java.net/~mchung/valhalla/webrevs/8185148/webrev.00/index.html
>> 
>> Mandy
>> [1] http://mail.openjdk.java.net/pipermail/valhalla-dev/2017-July/003007.html
> 




More information about the valhalla-dev mailing list