X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2Fsm%2FCompact.c;h=eceaba40101a316d2c2f34d12dfe1c0100108ee8;hb=329077220af83860d5dd6891649cb1058b5bbaa6;hp=977e31d811de54b180818fa8b1632294158cdae9;hpb=75aadeee9fc8495b2eaf3f2448591846cc917968;p=ghc-hetmet.git diff --git a/rts/sm/Compact.c b/rts/sm/Compact.c index 977e31d..eceaba4 100644 --- a/rts/sm/Compact.c +++ b/rts/sm/Compact.c @@ -335,8 +335,9 @@ thread_stack(StgPtr p, StgPtr stack_end) case CATCH_STM_FRAME: case ATOMICALLY_FRAME: case UPDATE_FRAME: - case STOP_FRAME: - case CATCH_FRAME: + case UNDERFLOW_FRAME: + case STOP_FRAME: + case CATCH_FRAME: case RET_SMALL: bitmap = BITMAP_BITS(info->i.layout.bitmap); size = BITMAP_SIZE(info->i.layout.bitmap); @@ -480,8 +481,8 @@ thread_TSO (StgTSO *tso) thread_(&tso->trec); - thread_stack(tso->sp, &(tso->stack[tso->stack_size])); - return (StgPtr)tso + tso_sizeW(tso); + thread_(&tso->stackobj); + return (StgPtr)tso + sizeofW(StgTSO); } @@ -521,9 +522,12 @@ update_fwd_large( bdescr *bd ) continue; } - case TSO: - thread_TSO((StgTSO *)p); - continue; + case STACK: + { + StgStack *stack = (StgStack*)p; + thread_stack(stack->sp, stack->stack + stack->stack_size); + continue; + } case AP_STACK: thread_AP_STACK((StgAP_STACK *)p); @@ -706,6 +710,13 @@ thread_obj (StgInfoTable *info, StgPtr p) case TSO: return thread_TSO((StgTSO *)p); + case STACK: + { + StgStack *stack = (StgStack*)p; + thread_stack(stack->sp, stack->stack + stack->stack_size); + return p + stack_sizeW(stack); + } + case TREC_CHUNK: { StgWord i; @@ -899,8 +910,8 @@ update_bkwd_compact( generation *gen ) } // relocate TSOs - if (info->type == TSO) { - move_TSO((StgTSO *)p, (StgTSO *)free); + if (info->type == STACK) { + move_STACK((StgStack *)p, (StgStack *)free); } free += size; @@ -943,11 +954,6 @@ compact(StgClosure *static_objects) bdescr *bd; StgPtr p; nat n; - for (bd = generations[g].mut_list; bd != NULL; bd = bd->link) { - for (p = bd->start; p < bd->free; p++) { - thread((StgClosure **)p); - } - } for (n = 0; n < n_capabilities; n++) { for (bd = capabilities[n].mut_lists[g]; bd != NULL; bd = bd->link) {