X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=rts%2FRetainerProfile.c;h=036eacf08b3e7fd7caca6516479299d3f65541ca;hb=60610640fdf2f9b037f2d323f3e1127849e76028;hp=2613b9e4bce455953b4a56a583a9e8ccb4c4727e;hpb=6015a94f9108a502150565577b66c23650796639;p=ghc-hetmet.git diff --git a/rts/RetainerProfile.c b/rts/RetainerProfile.c index 2613b9e..036eacf 100644 --- a/rts/RetainerProfile.c +++ b/rts/RetainerProfile.c @@ -364,8 +364,7 @@ find_srt( stackPos *info ) bitmap = info->next.srt.srt_bitmap; while (bitmap != 0) { if ((bitmap & 1) != 0) { -#ifdef ENABLE_WIN32_DLL_SUPPORT - +#if defined(__PIC__) && defined(mingw32_TARGET_OS) if ((unsigned long)(*(info->next.srt.srt)) & 0x1) c = (* (StgClosure **)((unsigned long)*(info->next.srt.srt)) & ~0x1); else @@ -865,6 +864,7 @@ pop( StgClosure **c, StgClosure **cp, retainer *r ) // we divide the step counter: the 2 low bits indicate // which field, and the rest of the bits indicate the // entry number (starting from zero). + TRecEntry *entry; nat entry_no = se->info.next.step >> 2; nat field_no = se->info.next.step & 3; if (entry_no == ((StgTRecChunk *)se->c)->next_entry_idx) { @@ -872,7 +872,7 @@ pop( StgClosure **c, StgClosure **cp, retainer *r ) popOff(); return; } - TRecEntry *entry = &((StgTRecChunk *)se->c)->entries[entry_no]; + entry = &((StgTRecChunk *)se->c)->entries[entry_no]; if (field_no == 0) { *c = (StgClosure *)entry->tvar; } else if (field_no == 1) { @@ -1440,7 +1440,7 @@ retainStack( StgClosure *c, retainer c_child_r, StgFunInfoTable *fun_info; retainClosure(ret_fun->fun, c, c_child_r); - fun_info = get_fun_itbl(ret_fun->fun); + fun_info = get_fun_itbl(UNTAG_CLOSURE(ret_fun->fun)); p = (P_)&ret_fun->payload; switch (fun_info->f.fun_type) {