RFR: 8147755: ASM should create correct constant tag for invokestatic on handle point to interface static method
yumin.qi at oracle.com
Sun Jan 24 22:16:40 UTC 2016
Thanks for your update!
Glad to see it fixed in ASM. wish get the new version soon.
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.
> ----- 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
>> 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-126.96.36.199 Method Resolution:
>> " If C is an interface, method resolution throws an
>> JVMS-188.8.131.52 Interface Method Resolution:
>> "If C is not an interface, interface method resolution throws an
>> 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.
More information about the core-libs-dev