Mercurial > hg > graal-jvmci-8
diff jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaMethod.java @ 23741:6542cd8da2da
include VarHandle in signature polymorphic method test (JDK-8164214)
author | Doug Simon <doug.simon@oracle.com> |
---|---|
date | Tue, 23 Aug 2016 22:58:50 +0200 |
parents | ae27c683c128 |
children | d6bd0b9cd0b6 |
line wrap: on
line diff
--- a/jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaMethod.java Tue Aug 23 22:46:08 2016 +0200 +++ b/jvmci/jdk.vm.ci.meta/src/jdk/vm/ci/meta/ResolvedJavaMethod.java Tue Aug 23 22:58:50 2016 +0200 @@ -23,7 +23,6 @@ package jdk.vm.ci.meta; import java.lang.annotation.Annotation; -import java.lang.invoke.MethodHandle; import java.lang.reflect.AnnotatedElement; import java.lang.reflect.Array; import java.lang.reflect.Method; @@ -330,22 +329,4 @@ } SpeculationLog getSpeculationLog(); - - /** - * Determines if the method identified by its holder and name is a - * <a href="https://docs.oracle.com/javase/specs/jvms/se8/html/jvms-2.html#jvms-2.9">signature - * polymorphic</a> method. - */ - static boolean isSignaturePolymorphic(JavaType holder, String name, MetaAccessProvider metaAccess) { - if (!holder.getName().equals("Ljava/lang/invoke/MethodHandle;")) { - return false; - } - ResolvedJavaType methodHandleType = metaAccess.lookupJavaType(MethodHandle.class); - Signature signature = metaAccess.parseMethodDescriptor("([Ljava/lang/Object;)Ljava/lang/Object;"); - ResolvedJavaMethod method = methodHandleType.findMethod(name, signature); - if (method == null) { - return false; - } - return method.isNative() && method.isVarArgs(); - } }