mirror of
https://github.com/corda/corda.git
synced 2025-01-19 11:16:54 +00:00
assert that the target of an invokestatic call is a static method and that the targets of all other invokes are non-static
This commit is contained in:
parent
623b5f84dc
commit
bf58eaa6ba
@ -2623,6 +2623,8 @@ compile(MyThread* t, Frame* initialFrame, unsigned ip,
|
||||
object target = resolveMethod(t, codePool(t, code), index - 1);
|
||||
if (UNLIKELY(t->exception)) return;
|
||||
|
||||
assert(t, (methodFlags(t, target) & ACC_STATIC) == 0);
|
||||
|
||||
unsigned parameterFootprint = methodParameterFootprint(t, target);
|
||||
|
||||
unsigned instance = parameterFootprint - 1;
|
||||
@ -2661,6 +2663,8 @@ compile(MyThread* t, Frame* initialFrame, unsigned ip,
|
||||
target = findMethod(t, target, classSuper(t, class_));
|
||||
}
|
||||
|
||||
assert(t, (methodFlags(t, target) & ACC_STATIC) == 0);
|
||||
|
||||
compileDirectInvoke(t, frame, target);
|
||||
} break;
|
||||
|
||||
@ -2670,6 +2674,8 @@ compile(MyThread* t, Frame* initialFrame, unsigned ip,
|
||||
object target = resolveMethod(t, codePool(t, code), index - 1);
|
||||
if (UNLIKELY(t->exception)) return;
|
||||
|
||||
assert(t, methodFlags(t, target) & ACC_STATIC);
|
||||
|
||||
compileDirectInvoke(t, frame, target);
|
||||
} break;
|
||||
|
||||
@ -2679,6 +2685,8 @@ compile(MyThread* t, Frame* initialFrame, unsigned ip,
|
||||
object target = resolveMethod(t, codePool(t, code), index - 1);
|
||||
if (UNLIKELY(t->exception)) return;
|
||||
|
||||
assert(t, (methodFlags(t, target) & ACC_STATIC) == 0);
|
||||
|
||||
unsigned parameterFootprint = methodParameterFootprint(t, target);
|
||||
|
||||
unsigned offset = ClassVtable + (methodOffset(t, target) * BytesPerWord);
|
||||
|
Loading…
Reference in New Issue
Block a user