8033465: JSR292: InvokerBytecodeGenerator: convert a check for REF_invokeVirtual on an interface into an assert

Reviewed-by: vlivanov
This commit is contained in:
Michael Haupt 2015-04-14 18:26:01 +03:00
parent c9ac987bf3
commit 2e8fb0e5de

View File

@ -847,11 +847,7 @@ class InvokerBytecodeGenerator {
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);