Remove the IND_OLDGEN and IND_OLDGEN_PERM closure types
[ghc-hetmet.git] / includes / rts / storage / ClosureMacros.h
index a115f6f..56e7dca 100644 (file)
    SET_HDR(c,info,costCentreStack);                    \
    (c)->words = n_words;
 
+// Use when changing a closure from one kind to another
+#define OVERWRITE_INFO(c, new_info)                             \
+   LDV_RECORD_DEAD_FILL_SLOP_DYNAMIC((StgClosure *)(c));       \
+   SET_INFO((c), (new_info));                                  \
+   LDV_RECORD_CREATE(c);
+
 /* -----------------------------------------------------------------------------
    How to get hold of the static link field for a static closure.
    -------------------------------------------------------------------------- */
@@ -249,7 +255,7 @@ INLINE_HEADER StgOffset THUNK_SELECTOR_sizeW ( void )
 { return sizeofW(StgSelector); }
 
 INLINE_HEADER StgOffset BLACKHOLE_sizeW ( void )
-{ return sizeofW(StgHeader)+MIN_PAYLOAD_SIZE; }
+{ return sizeofW(StgInd); } // a BLACKHOLE is a kind of indirection
 
 /* --------------------------------------------------------------------------
    Sizes of closures
@@ -321,8 +327,6 @@ closure_sizeW_ (StgClosure *p, StgInfoTable *info)
        return pap_sizeW((StgPAP *)p);
     case IND:
     case IND_PERM:
-    case IND_OLDGEN:
-    case IND_OLDGEN_PERM:
        return sizeofW(StgInd);
     case ARR_WORDS:
        return arr_words_sizeW((StgArrWords *)p);