8033465: JSR292: InvokerBytecodeGenerator: convert a check for REF_invokeVirtual on an interface into an assert
Reviewed-by: vlivanov
--- 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);