changeset 11851:e0ac3e9decb0

8033465: JSR292: InvokerBytecodeGenerator: convert a check for REF_invokeVirtual on an interface into an assert Reviewed-by: vlivanov
author mhaupt
date Tue, 14 Apr 2015 18:26:01 +0300
parents 44a53b8e25e6
children bef7b5c2a953
files src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java
diffstat 1 files changed, 1 insertions(+), 5 deletions(-) [+]
line wrap: on
line diff
--- a/src/java.base/share/classes/java/lang/invoke/InvokerBytecodeGenerator.java	Tue Apr 14 18:16:02 2015 +0300
+++ b/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);