fix handling of virtual calls to native methods

This commit is contained in:
Joel Dice 2009-04-25 17:52:08 -06:00
parent 141862470b
commit 89221bfcfa

View File

@ -4641,7 +4641,9 @@ compileVirtualMethod2(MyThread* t, object class_, unsigned index)
return 0;
} else {
void* address = reinterpret_cast<void*>(methodAddress(t, target));
if (address != reinterpret_cast<void*>(nativeThunk(t))) {
if (methodFlags(t, target) & ACC_NATIVE) {
t->trace->nativeMethod = target;
} else {
classVtable(t, class_, methodOffset(t, target)) = address;
}
return address;