fix race condition in compile function (part 2)

This commit is contained in:
Joel Dice 2008-07-11 18:14:30 -06:00
parent dc52bae1cf
commit b1f24079ec

View File

@ -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);
}
}
}
}