8033465: JSR292: InvokerBytecodeGenerator: convert a check for REF_invokeVirtual on an interface into an assert
authormhaupt
Tue, 14 Apr 2015 18:26:01 +0300
changeset 30343 bf75edd66df0
parent 30342 82a0e2fb9892
child 30345 9c3d245dd8cc
8033465: JSR292: InvokerBytecodeGenerator: convert a check for REF_invokeVirtual on an interface into an assert Reviewed-by: vlivanov
jdk/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java
--- a/jdk/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java	Tue Apr 14 18:16:02 2015 +0300
+++ b/jdk/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java	Tue Apr 14 18:26:01 2015 +0300
@@ -847,11 +847,7 @@
             refKind = REF_invokeVirtual;
         }
 
-        if (member.getDeclaringClass().isInterface() && refKind == REF_invokeVirtual) {
-            // Methods from Object declared in an interface can be resolved by JVM to invokevirtual kind.
-            // Need to convert it back to invokeinterface to pass verification and make the invocation works as expected.
-            refKind = REF_invokeInterface;
-        }
+        assert(!(member.getDeclaringClass().isInterface() && refKind == REF_invokeVirtual));
 
         // push arguments
         emitPushArguments(name);