From b1f24079ec710dea52cec088135cc2e0325196c6 Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Fri, 11 Jul 2008 18:14:30 -0600 Subject: [PATCH] fix race condition in compile function (part 2) --- src/compile.cpp | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) 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); + } } } }