Commit e2eebc0d authored by Simon Marlow's avatar Simon Marlow
Browse files

fix a couple of bugs in markSparkQueue (#799)

parent 05152031
...@@ -129,13 +129,15 @@ markSparkQueue (evac_fn evac) ...@@ -129,13 +129,15 @@ markSparkQueue (evac_fn evac)
sparkp = pool->hd; sparkp = pool->hd;
to_sparkp = pool->hd; to_sparkp = pool->hd;
while (sparkp != pool->tl) { while (sparkp != pool->tl) {
ASSERT(to_sparkp<=sparkp);
ASSERT(*sparkp!=NULL); ASSERT(*sparkp!=NULL);
ASSERT(LOOKS_LIKE_CLOSURE_PTR(((StgClosure *)*sparkp))); ASSERT(LOOKS_LIKE_CLOSURE_PTR(((StgClosure *)*sparkp)));
// ToDo?: statistics gathering here (also for GUM!) // ToDo?: statistics gathering here (also for GUM!)
if (closure_SHOULD_SPARK(*sparkp)) { if (closure_SHOULD_SPARK(*sparkp)) {
evac(sparkp); evac(sparkp);
*to_sparkp++ = *sparkp; *to_sparkp++ = *sparkp;
if (to_sparkp == pool->lim) {
to_sparkp = pool->base;
}
n++; n++;
} else { } else {
pruned_sparks++; pruned_sparks++;
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment