RFR: 8164214: [JVMCI] include VarHandle in signature polymorphic method test

Paul Sandoz paul.sandoz at oracle.com
Wed Aug 17 20:00:41 UTC 2016


> On 17 Aug 2016, at 06:08, Doug Simon <doug.simon at oracle.com> wrote:
> 
> Please review this change that should have been part of 8163962. The problem is that java.lang.invoke.VarHandle needs to be treated the same as java.lang.invoke.MethodHandle when resolving invoke bytecodes, especially when the resolution should be eager (e.g., as may be required for ahead of time compilation).
> 
> I removed ResolvedJavaMethod.isSignaturePolymorphic(...) as well since a) it was broken and b) we should rely as much as possible on VM code to do the test for whether a method is signature polymorphic to be more future proof.
> 
> Note that in HotSpotConstantPool.java I also converted sanity check methods of the form `void assert<Condition>(...)` to `boolean check<Condition>(...)` so that the call itself is only made when assertions are enabled. Some of these checks make VM calls which can slow down constant pool resolution and thus bytecode parsing. I can refactor this change into a separate bug if anyone insists.
> 
> https://bugs.openjdk.java.net/browse/JDK-8164214
> http://cr.openjdk.java.net/~dnsimon/8164214
> 

+1, especially to deferring to the VM for the sig-poly query.

Paul.
-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 841 bytes
Desc: Message signed with OpenPGP using GPGMail
URL: <http://mail.openjdk.java.net/pipermail/hotspot-compiler-dev/attachments/20160817/92bf6aa1/signature-0001.asc>


More information about the hotspot-compiler-dev mailing list