diff --git a/src/compile.cpp b/src/compile.cpp index b300bf83b1..91c2a7b983 100644 --- a/src/compile.cpp +++ b/src/compile.cpp @@ -5094,11 +5094,6 @@ compile(MyThread* t, object method) set(t, method, MethodCompiled, compiled); - if (methodVirtual(t, method)) { - classVtable(t, methodClass(t, method), methodOffset(t, method)) - = &singletonValue(t, compiled, 0); - } - if ((methodFlags(t, method) & ACC_NATIVE) == 0) { if (DebugMethodTree) { fprintf(stderr, "insert method at %p\n", @@ -5109,6 +5104,11 @@ compile(MyThread* t, object method) (t, methodTree(t), method, methodTreeSentinal(t), compareMethodBounds); } + + if (methodVirtual(t, method)) { + classVtable(t, methodClass(t, method), methodOffset(t, method)) + = &singletonValue(t, compiled, 0); + } } } }