RFR JDK-8207194: [lworld] Update InnerClassLambdaMetafactory to add ValueTypes attribute in generated class

Harold David Seigel harold.seigel at oracle.com
Mon Jul 16 13:00:50 UTC 2018


Sorry, I meant class: 
*src/java.base/share/classes/java/lang/invoke/InnerClassLambdaMetafactory.java*

Harold
**


On 7/16/2018 8:42 AM, Harold David Seigel wrote:
> Hi Mandy,
>
> The JVM changes look good.  I like the improvement to the ICCE error 
> messages.
>
> Can you change the CLASSFILE_VERSION in ClassLambdaMetafactory.java 
> from 52 to either 55 or JVM_CLASSFILE_MAJOR_VERSION ?
>
> The ValueTypes attribute should be ignored in class file versions < 55.
>
> Similar changes may also be needed here:
>
>  src/java.base/share/classes/jdk/experimental/value/MethodHandleBuilder.java
>    share/classes/java/lang/invoke/StringConcatFactory.java
>    share/classes/java/lang/reflect/ProxyGenerator.java
>
> Thanks, Harold
>
> On 7/13/2018 9:14 PM, mandy chung wrote:
>> VarHandleTest* and ValueConstructorRef tests fail with ICCE with
>> ValueTypes consistency checking because lambda generated class
>> is missing ValueTypes attribute whereas the target class has
>> the value types locally declared in the attribute.
>>
>> This patch updates InnerClassLambdaMetafactory to generate lambda
>> classes with ValueTypes attribute.  We will examine other class
>> file generators in JDK separately (JDK-8207315).  I also changed
>> ICCE to include the relevant info which is helpful for troubleshooting.
>> It may be useful to add a new method to return the list of declared
>> value types but leave it for another day.
>>
>> Webrev:
>> http://cr.openjdk.java.net/~mchung/valhalla/webrevs/8207194/webrev.00
>>
>> I ran jdk_core, jdk_valhalla, and hotspot_valhalla test groups.
>>
>> Mandy
>



More information about the valhalla-dev mailing list