From 89221bfcfa6c0928af6382f67961da8fb5975fa6 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Sat, 25 Apr 2009 17:52:08 -0600 Subject: [PATCH] fix handling of virtual calls to native methods --- src/compile.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/compile.cpp b/src/compile.cpp index 3bd85c34fa..24fd2077fc 100644 --- a/src/compile.cpp +++ b/src/compile.cpp @@ -4641,7 +4641,9 @@ compileVirtualMethod2(MyThread* t, object class_, unsigned index) return 0; } else { void* address = reinterpret_cast(methodAddress(t, target)); - if (address != reinterpret_cast(nativeThunk(t))) { + if (methodFlags(t, target) & ACC_NATIVE) { + t->trace->nativeMethod = target; + } else { classVtable(t, class_, methodOffset(t, target)) = address; } return address;