/* -----------------------------------------------------------------------------
- * $Id: GCCompact.c,v 1.14 2003/03/24 14:46:54 simonmar Exp $
+ * $Id: GCCompact.c,v 1.17 2003/10/22 11:11:59 simonmar Exp $
*
* (c) The GHC Team 2001
*
// traverse the bitmap first
bitmap = GET_LIVENESS(dyn);
p = (P_)&((StgRetDyn *)p)->payload[0];
- size = RET_DYN_SIZE;
+ size = RET_DYN_BITMAP_SIZE;
while (size > 0) {
if ((bitmap & 1) == 0) {
thread(p);
}
// skip over the non-ptr words
- p += GET_NONPTRS(dyn);
+ p += GET_NONPTRS(dyn) + RET_DYN_NONPTR_REGS_SIZE;
// follow the ptr words
for (size = GET_PTRS(dyn); size > 0; size--) {
nat size;
p++;
- thread(p);
bco = (StgBCO *)*p;
+ thread(p);
p++;
size = BCO_BITMAP_SIZE(bco);
thread_large_bitmap(p, BCO_BITMAP(bco), size);
StgRetFun *ret_fun = (StgRetFun *)p;
StgFunInfoTable *fun_info;
- fun_info = itbl_to_fun_itbl(get_threaded_info(ret_fun->fun));
+ fun_info = itbl_to_fun_itbl(
+ get_threaded_info((StgPtr)ret_fun->fun));
// *before* threading it!
thread((StgPtr)&ret_fun->fun);
p = thread_arg_block(fun_info, ret_fun->payload);
StgWord bitmap, size;
StgFunInfoTable *fun_info;
- fun_info = itbl_to_fun_itbl(get_threaded_info(pap->fun));
+ fun_info = itbl_to_fun_itbl(get_threaded_info((StgPtr)pap->fun));
ASSERT(fun_info->i.type != PAP);
p = (StgPtr)pap->payload;