RFR: 8147755: ASM should create correct constant tag for invokestatic on handle point to interface static method
Yumin Qi
yumin.qi at oracle.com
Sun Jan 24 22:16:40 UTC 2016
Hi, Remi
Thanks for your update!
Glad to see it fixed in ASM. wish get the new version soon.
Thanks
Yumin
On 1/24/2016 7:36 AM, Remi Forax wrote:
> Hi Yumin,
> I'm one of the developers of ASM,
> I've pushed a new versions of ASM (the future 5.1) in the trunk that should let you create constant method handles on an interface,
> when i have updated ASM for Java 8, i've overlooked that case, sorry for that.
>
> The code is mostly similar to your patch but it does the full roundtrip, being able not only to encode constant method handles on interface but also to decode them.
>
> Kumar is in CC, i believe, he is the one that sync the private copy of ASM used by the JDK with the SVN trunk.
>
> regards,
> Rémi
>
> ----- Mail original -----
>> De: "Yumin Qi" <yumin.qi at oracle.com>
>> À: core-libs-dev at openjdk.java.net, "CHRIS.HEGARTY" <chris.hegarty at oracle.com>, "harold seigel"
>> <harold.seigel at oracle.com>, "Lois Foltan" <lois.foltan at oracle.com>, "Vladimir Ivanov" <vladimir.x.ivanov at oracle.com>
>> Envoyé: Vendredi 22 Janvier 2016 21:22:06
>> Objet: RFR: 8147755: ASM should create correct constant tag for invokestatic on handle point to interface static
>> method
>>
>> Hi, All
>>
>> Can I have a review for
>> bug: https://bugs.openjdk.java.net/browse/JDK-8147755
>> Webrev: http://cr.openjdk.java.net/~minqi/8147755/webrev-01/
>>
>> Summary: When fix bug 8145148 to follow:
>>
>> JVMS-5.4.3.3 Method Resolution:
>> " If C is an interface, method resolution throws an
>> IncompatibleClassChangeError."
>> JVMS-5.4.3.4 Interface Method Resolution:
>> "If C is not an interface, interface method resolution throws an
>> IncompatibleClassChangeError"
>>
>> In defmeth(default method) tests, a MethodHandle pointing to
>> interface static method will violate the spec. Since such a handle in
>> asm will generate a tag of Methodref in constantpool for the call site,
>> with the fix of 8145148, it requires a tag of InterfaceMethodref.
>>
>> Fix by create a new constructor of Handle with extra boolean to
>> indicate if the handle points to interface static method.
>>
>> Tests: A test case and resulted constantpool data attached.
>> The fix will not affect existing code.
>> Also tested with fixed 8145148 and revised defmeth
>> with the new version Handle and passed.
>>
>> Thanks
>> Yumin
>>
>>
>>
More information about the core-libs-dev
mailing list