Fix bug: eval_thunk_selector was calling the unlocked evacuate()
[ghc-hetmet.git] / rts / sm / Evac.c-inc
index 477c061..4fe9d5d 100644 (file)
@@ -39,6 +39,7 @@ copy_tag(StgClosure **p, StgClosure *src, nat size, step *stp, StgWord tag)
        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
@@ -482,7 +483,7 @@ loop:
       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();
          }
@@ -563,3 +564,8 @@ loop:
 
   barf("evacuate");
 }
+
+#undef copy
+#undef copy_tag
+#undef copyPart
+#undef evacuate