if (mts.isStatic()) {
throw new IncompatibleClassChangeError(
"Static method in invokevirtual");
}
final VmInstanceMethod method = (VmInstanceMethod) mts;
final VmType<?> declClass = method.getDeclaringClass();
if (declClass.isMagicType()) {
magicHelper.emitMagic(eContext, method, false, this, currentMethod);
} else {
// TODO: port to ORP style (http://orp.sourceforge.net/)
vstack.push(eContext);
dropParameters(mts, true);
if (method.isFinal() || method.isPrivate() || declClass.isFinal()) {
// Do a fast invocation
if (countBytecode) {
counters.getCounter("invokevirtual-final").inc();
}
// Call the methods native code from the statics table
helper.invokeJavaMethod(method);
// Result is already on the stack.
} else {
// Do a virtual method table invocation
if (countBytecode) {
counters.getCounter("invokevirtual-vmt").inc();
}
final int tibIndex = method.getTibOffset();
final int argSlotCount = Signature.getArgSlotCount(typeSizeInfo, methodRef
.getSignature());
final int slotSize = helper.SLOTSIZE;
final int asize = helper.ADDRSIZE;