FIX compacting GC (bug1010, and other failures)
[ghc-hetmet.git] / rts / sm / Scav.c
index 139ecad..f211401 100644 (file)
@@ -200,7 +200,7 @@ scavenge_PAP_payload (StgClosure *fun, StgClosure **payload, StgWord size)
     StgWord bitmap;
     StgFunInfoTable *fun_info;
     
-    fun_info = get_fun_itbl(fun);
+    fun_info = get_fun_itbl(UNTAG_CLOSURE(fun));
     ASSERT(fun_info->i.type != PAP);
     p = (StgPtr)payload;
 
@@ -1649,7 +1649,6 @@ scavenge_stack(StgPtr p, StgPtr stack_end)
     case STOP_FRAME:
     case CATCH_FRAME:
     case RET_SMALL:
-    case RET_VEC_SMALL:
        bitmap = BITMAP_BITS(info->i.layout.bitmap);
        size   = BITMAP_SIZE(info->i.layout.bitmap);
        // NOTE: the payload starts immediately after the info-ptr, we
@@ -1678,7 +1677,6 @@ scavenge_stack(StgPtr p, StgPtr stack_end)
 
       // large bitmap (> 32 entries, or > 64 on a 64-bit machine) 
     case RET_BIG:
-    case RET_VEC_BIG:
     {
        nat size;
 
@@ -1722,7 +1720,7 @@ scavenge_stack(StgPtr p, StgPtr stack_end)
        StgFunInfoTable *fun_info;
 
        ret_fun->fun = evacuate(ret_fun->fun);
-       fun_info = get_fun_itbl(ret_fun->fun);
+       fun_info = get_fun_itbl(UNTAG_CLOSURE(ret_fun->fun));
        p = scavenge_arg_block(fun_info, ret_fun->payload);
        goto follow_srt;
     }