From f5c74dcaeccb8712988b57ddf8a8c6696fbd008a Mon Sep 17 00:00:00 2001 From: Joel Dice Date: Tue, 16 Oct 2007 19:23:20 -0600 Subject: [PATCH] fix invalid use of Heap::needsMark in vm::mark --- src/machine.h | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/machine.h b/src/machine.h index a545abc6dc..c2f4fa50da 100644 --- a/src/machine.h +++ b/src/machine.h @@ -1424,9 +1424,9 @@ allocate(Thread* t, unsigned sizeInBytes) inline void mark(Thread* t, object* targets, unsigned count) { - if (t->m->heap->needsMark(reinterpret_cast(targets))) { - ACQUIRE_RAW(t, t->m->heapLock); - for (unsigned i = 0; i < count; ++i) { + ACQUIRE_RAW(t, t->m->heapLock); + for (unsigned i = 0; i < count; ++i) { + if (t->m->heap->needsMark(reinterpret_cast(targets + i))) { t->m->heap->mark(reinterpret_cast(targets + i)); } }