X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=ghc%2Frts%2FGC.c;h=7a447fdec3da1bf5761257a911a388a5e73f4cb5;hb=a395e1afebc881a6aafbc246c6de2bb21fd32048;hp=3ab057a1d12f5dfefeff6ac4b52a7104223f4e47;hpb=7a236a564b90cd060612e1e979ce7d552da61fa1;p=ghc-hetmet.git diff --git a/ghc/rts/GC.c b/ghc/rts/GC.c index 3ab057a..7a447fd 100644 --- a/ghc/rts/GC.c +++ b/ghc/rts/GC.c @@ -1,5 +1,5 @@ /* ----------------------------------------------------------------------------- - * $Id: GC.c,v 1.155 2003/05/14 09:13:59 simonmar Exp $ + * $Id: GC.c,v 1.157 2003/06/26 20:47:47 panne Exp $ * * (c) The GHC Team 1998-2003 * @@ -1930,8 +1930,18 @@ loop: * list it contains. */ { - StgTSO *new_tso = (StgTSO *)copy((StgClosure *)tso,tso_sizeW(tso),stp); + StgTSO *new_tso; + StgPtr p, q; + + new_tso = (StgTSO *)copyPart((StgClosure *)tso, + tso_sizeW(tso), + sizeofW(StgTSO), stp); move_TSO(tso, new_tso); + for (p = tso->sp, q = new_tso->sp; + p < tso->stack+tso->stack_size;) { + *q++ = *p++; + } + return (StgClosure *)new_tso; } } @@ -2165,7 +2175,7 @@ move_TSO (StgTSO *src, StgTSO *dest) { ptrdiff_t diff; - // relocate the stack pointers... + // relocate the stack pointer... diff = (StgPtr)dest - (StgPtr)src; // In *words* dest->sp = (StgPtr)dest->sp + diff; } @@ -2183,7 +2193,7 @@ scavenge_large_srt_bitmap( StgLargeSRT *large_srt ) b = 0; bitmap = large_srt->l.bitmap[b]; size = (nat)large_srt->l.size; - p = large_srt->srt; + p = (StgClosure **)large_srt->srt; for (i = 0; i < size; ) { if ((bitmap & 1) != 0) { evacuate(*p);