remove EVACUATED: store the forwarding pointer in the info pointer
[ghc-hetmet.git] / rts / sm / GCAux.c
index df47e18..825d0f9 100644 (file)
@@ -70,7 +70,15 @@ isAlive(StgClosure *p)
        return p;
     }
 
-    info = get_itbl(q);
+    info = q->header.info;
+
+    if (IS_FORWARDING_PTR(info)) {
+        // alive! 
+        return (StgClosure*)UN_FORWARDING_PTR(info);
+    }
+
+    info = INFO_PTR_TO_STRUCT(info);
+
     switch (info->type) {
 
     case IND:
@@ -82,10 +90,6 @@ isAlive(StgClosure *p)
       p = ((StgInd *)q)->indirectee;
       continue;
 
-    case EVACUATED:
-      // alive! 
-      return ((StgEvacuated *)q)->evacuee;
-
     case TSO:
       if (((StgTSO *)q)->what_next == ThreadRelocated) {
        p = (StgClosure *)((StgTSO *)q)->_link;