From 22a570796647c4ef9a950df15905bb3d1d68567d Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Mon, 11 Aug 2008 15:16:55 -0600 Subject: [PATCH] remove obsolete code from postVisit; upgrade assert to expect for debugging --- src/machine.cpp | 15 ++++----------- 1 file changed, 4 insertions(+), 11 deletions(-) diff --git a/src/machine.cpp b/src/machine.cpp index eaeea44830..c622a35cf9 100644 --- a/src/machine.cpp +++ b/src/machine.cpp @@ -356,15 +356,7 @@ postVisit(Thread* t, Heap::Visitor* v) Machine* m = t->m; bool major = m->heap->collectionType() == Heap::MajorCollection; - for (object* p = &(m->finalizeQueue); *p; p = &(finalizerNext(t, *p))) { - v->visit(p); - v->visit(&finalizerTarget(t, *p)); - } - - for (object* p = &(m->finalizeQueue); *p; p = &(finalizerNext(t, *p))) { - v->visit(p); - v->visit(&finalizerTarget(t, *p)); - } + assert(t, m->finalizeQueue == 0); object firstNewTenuredFinalizer = 0; object lastNewTenuredFinalizer = 0; @@ -469,7 +461,8 @@ postVisit(Thread* t, Heap::Visitor* v) } if (lastNewTenuredWeakReference) { - jreferenceVmNext(t, lastNewTenuredWeakReference) = m->tenuredWeakReferences; + jreferenceVmNext(t, lastNewTenuredWeakReference) + = m->tenuredWeakReferences; m->tenuredWeakReferences = firstNewTenuredWeakReference; } } @@ -1457,7 +1450,7 @@ removeMonitor(Thread* t, object o) object p = hashMapRemove(t, t->m->monitorMap, o, objectHash, objectEqual); - assert(t, p); + expect(t, p); if (DebugMonitors) { fprintf(stderr, "dispose monitor %p for object %x\n",