ignore instance variable for static method invocations

This commit is contained in:
Joel Dice 2013-04-18 11:25:29 -06:00
parent b4c3eea0f1
commit e6b6edfc25

View File

@ -4706,6 +4706,10 @@ jvmInvokeMethod(Thread* t, uintptr_t* arguments)
(t, jclassVmClass(t, jmethodClazz(t, *method))),
jmethodSlot(t, *method));
if (methodFlags(t, vmMethod) & ACC_STATIC) {
instance = 0;
}
if (instance and not instanceOf(t, methodClass(t, vmMethod), *instance)) {
throwNew(t, Machine::IllegalArgumentExceptionType);
}