projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
more fixes for THUNK_SELECTORs
[ghc-hetmet.git]
/
rts
/
sm
/
Evac.c-inc
diff --git
a/rts/sm/Evac.c-inc
b/rts/sm/Evac.c-inc
index
c7e43c3
..
367d277
100644
(file)
--- a/
rts/sm/Evac.c-inc
+++ b/
rts/sm/Evac.c-inc
@@
-34,11
+34,14
@@
copy_tag(StgClosure **p, StgClosure *src, nat size, step *stp, StgWord tag)
info = xchg((StgPtr)&src->header.info, (W_)&stg_WHITEHOLE_info);
// so.. what is it?
} while (info == (W_)&stg_WHITEHOLE_info);
info = xchg((StgPtr)&src->header.info, (W_)&stg_WHITEHOLE_info);
// so.. what is it?
} while (info == (W_)&stg_WHITEHOLE_info);
- if (info == (W_)&stg_EVACUATED_info) {
+ if (info == (W_)&stg_EVACUATED_info || info == (W_)&stg_IND_info) {
+ // NB. a closure might be updated with an IND by
+ // unchain_selector_thunks(), hence the test above.
src->header.info = (const StgInfoTable *)info;
return evacuate(p); // does the failed_to_evac stuff
}
#else
src->header.info = (const StgInfoTable *)info;
return evacuate(p); // does the failed_to_evac stuff
}
#else
+ ASSERT(n_gc_threads == 1);
info = (W_)src->header.info;
src->header.info = &stg_EVACUATED_info;
#endif
info = (W_)src->header.info;
src->header.info = &stg_EVACUATED_info;
#endif
@@
-353,7
+356,7
@@
loop:
(StgClosure *)CHARLIKE_CLOSURE((StgChar)w)
);
}
(StgClosure *)CHARLIKE_CLOSURE((StgChar)w)
);
}
- if (q->header.info == Izh_con_info &&
+ else if (q->header.info == Izh_con_info &&
(StgInt)w >= MIN_INTLIKE && (StgInt)w <= MAX_INTLIKE) {
*p = TAG_CLOSURE(tag,
(StgClosure *)INTLIKE_CLOSURE((StgInt)w)
(StgInt)w >= MIN_INTLIKE && (StgInt)w <= MAX_INTLIKE) {
*p = TAG_CLOSURE(tag,
(StgClosure *)INTLIKE_CLOSURE((StgInt)w)
@@
-482,7
+485,7
@@
loop:
StgClosure *e = ((StgEvacuated*)q)->evacuee;
*p = e;
if (stp < gct->evac_step) { // optimisation
StgClosure *e = ((StgEvacuated*)q)->evacuee;
*p = e;
if (stp < gct->evac_step) { // optimisation
- if (HEAP_ALLOCED(e) && Bdescr((P_)e)->step < gct->evac_step) {
+ if (Bdescr((P_)e)->step < gct->evac_step) {
gct->failed_to_evac = rtsTrue;
TICK_GC_FAILED_PROMOTION();
}
gct->failed_to_evac = rtsTrue;
TICK_GC_FAILED_PROMOTION();
}
@@
-563,3
+566,8
@@
loop:
barf("evacuate");
}
barf("evacuate");
}
+
+#undef copy
+#undef copy_tag
+#undef copyPart
+#undef evacuate