Commit 55d535da authored by Simon Marlow's avatar Simon Marlow

Remove CONSTR_STATIC

Summary:
We currently have two info tables for a constructor

* XXX_con_info: the info table for a heap-resident instance of the
  constructor, It has type CONSTR, or one of the specialised types like
  CONSTR_1_0

* XXX_static_info: the info table for a static instance of this
  constructor, which has type CONSTR_STATIC or CONSTR_STATIC_NOCAF.

I'm getting rid of the latter, and using the `con_info` info table for
both static and dynamic constructors.  For rationale and more details
see Note [static constructors] in SMRep.hs.

I also removed these macros: `isSTATIC()`, `ip_STATIC()`,
`closure_STATIC()`, since they relied on the CONSTR/CONSTR_STATIC
distinction, and anyway HEAP_ALLOCED() does the same job.

Test Plan: validate

Reviewers: bgamari, simonpj, austin, gcampax, hvr, niteria, erikd

Subscribers: thomie

Differential Revision: https://phabricator.haskell.org/D2690

GHC Trac Issues: #12455
parent 6c0f10fa
......@@ -20,10 +20,8 @@ module CLabel (
mkEntryLabel,
mkSlowEntryLabel,
mkConEntryLabel,
mkStaticConEntryLabel,
mkRednCountsLabel,
mkConInfoTableLabel,
mkStaticInfoTableLabel,
mkLargeSRTLabel,
mkApEntryLabel,
mkApInfoTableLabel,
......@@ -33,9 +31,7 @@ module CLabel (
mkLocalInfoTableLabel,
mkLocalEntryLabel,
mkLocalConEntryLabel,
mkLocalStaticConEntryLabel,
mkLocalConInfoTableLabel,
mkLocalStaticInfoTableLabel,
mkLocalClosureTableLabel,
mkReturnPtLabel,
......@@ -390,8 +386,6 @@ data IdLabelInfo
| ConEntry -- ^ Constructor entry point
| ConInfoTable -- ^ Corresponding info table
| StaticConEntry -- ^ Static constructor entry point
| StaticInfoTable -- ^ Corresponding info table
| ClosureTable -- ^ Table of closures for Enum tycons
......@@ -479,25 +473,17 @@ mkEntryLabel :: Name -> CafInfo -> CLabel
mkClosureTableLabel :: Name -> CafInfo -> CLabel
mkLocalConInfoTableLabel :: CafInfo -> Name -> CLabel
mkLocalConEntryLabel :: CafInfo -> Name -> CLabel
mkLocalStaticInfoTableLabel :: CafInfo -> Name -> CLabel
mkLocalStaticConEntryLabel :: CafInfo -> Name -> CLabel
mkConInfoTableLabel :: Name -> CafInfo -> CLabel
mkStaticInfoTableLabel :: Name -> CafInfo -> CLabel
mkClosureLabel name c = IdLabel name c Closure
mkInfoTableLabel name c = IdLabel name c InfoTable
mkEntryLabel name c = IdLabel name c Entry
mkClosureTableLabel name c = IdLabel name c ClosureTable
mkLocalConInfoTableLabel c con = IdLabel con c ConInfoTable
mkLocalConEntryLabel c con = IdLabel con c ConEntry
mkLocalStaticInfoTableLabel c con = IdLabel con c StaticInfoTable
mkLocalStaticConEntryLabel c con = IdLabel con c StaticConEntry
mkConInfoTableLabel name c = IdLabel name c ConInfoTable
mkStaticInfoTableLabel name c = IdLabel name c StaticInfoTable
mkConEntryLabel :: Name -> CafInfo -> CLabel
mkStaticConEntryLabel :: Name -> CafInfo -> CLabel
mkConEntryLabel name c = IdLabel name c ConEntry
mkStaticConEntryLabel name c = IdLabel name c StaticConEntry
-- Constructing Cmm Labels
mkDirty_MUT_VAR_Label, mkSplitMarkerLabel, mkUpdInfoLabel,
......@@ -677,7 +663,6 @@ toSlowEntryLbl l = pprPanic "toSlowEntryLbl" (ppr l)
toEntryLbl :: CLabel -> CLabel
toEntryLbl (IdLabel n c LocalInfoTable) = IdLabel n c LocalEntry
toEntryLbl (IdLabel n c ConInfoTable) = IdLabel n c ConEntry
toEntryLbl (IdLabel n c StaticInfoTable) = IdLabel n c StaticConEntry
toEntryLbl (IdLabel n c _) = IdLabel n c Entry
toEntryLbl (CaseLabel n CaseReturnInfo) = CaseLabel n CaseReturnPt
toEntryLbl (CmmLabel m str CmmInfo) = CmmLabel m str CmmEntry
......@@ -688,7 +673,6 @@ toInfoLbl :: CLabel -> CLabel
toInfoLbl (IdLabel n c Entry) = IdLabel n c InfoTable
toInfoLbl (IdLabel n c LocalEntry) = IdLabel n c LocalInfoTable
toInfoLbl (IdLabel n c ConEntry) = IdLabel n c ConInfoTable
toInfoLbl (IdLabel n c StaticConEntry) = IdLabel n c StaticInfoTable
toInfoLbl (IdLabel n c _) = IdLabel n c InfoTable
toInfoLbl (CaseLabel n CaseReturnPt) = CaseLabel n CaseReturnInfo
toInfoLbl (CmmLabel m str CmmEntry) = CmmLabel m str CmmInfo
......@@ -944,7 +928,6 @@ idInfoLabelType info =
LocalInfoTable -> DataLabel
Closure -> GcPtrLabel
ConInfoTable -> DataLabel
StaticInfoTable -> DataLabel
ClosureTable -> DataLabel
RednCounts -> DataLabel
_ -> CodeLabel
......@@ -1239,8 +1222,6 @@ ppIdFlavor x = pp_cSEP <>
RednCounts -> text "ct"
ConEntry -> text "con_entry"
ConInfoTable -> text "con_info"
StaticConEntry -> text "static_entry"
StaticInfoTable -> text "static_info"
ClosureTable -> text "closure_tbl"
)
......
......@@ -177,6 +177,7 @@ data SMRep
-- | True <=> This is a static closure. Affects how we garbage-collect it.
-- Static closure have an extra static link field at the end.
-- Constructors do not have a static variant; see Note [static constructors]
type IsStatic = Bool
-- From an SMRep you can get to the closure type defined in
......@@ -287,10 +288,10 @@ isFunRep (HeapRep _ _ _ Fun{}) = True
isFunRep _ = False
isStaticNoCafCon :: SMRep -> Bool
-- This should line up exactly with CONSTR_NOCAF_STATIC above
-- This should line up exactly with CONSTR_NOCAF below
-- See Note [Static NoCaf constructors]
isStaticNoCafCon (HeapRep True 0 _ Constr{}) = True
isStaticNoCafCon _ = False
isStaticNoCafCon (HeapRep _ 0 _ Constr{}) = True
isStaticNoCafCon _ = False
-----------------------------------------------------------------------------
......@@ -428,12 +429,15 @@ rtsClosureType rep
= case rep of
RTSRep ty _ -> ty
HeapRep False 1 0 Constr{} -> CONSTR_1_0
HeapRep False 0 1 Constr{} -> CONSTR_0_1
HeapRep False 2 0 Constr{} -> CONSTR_2_0
HeapRep False 1 1 Constr{} -> CONSTR_1_1
HeapRep False 0 2 Constr{} -> CONSTR_0_2
HeapRep False _ _ Constr{} -> CONSTR
-- See Note [static constructors]
HeapRep _ 1 0 Constr{} -> CONSTR_1_0
HeapRep _ 0 1 Constr{} -> CONSTR_0_1
HeapRep _ 2 0 Constr{} -> CONSTR_2_0
HeapRep _ 1 1 Constr{} -> CONSTR_1_1
HeapRep _ 0 2 Constr{} -> CONSTR_0_2
HeapRep _ 0 _ Constr{} -> CONSTR_NOCAF
-- See Note [Static NoCaf constructors]
HeapRep _ _ _ Constr{} -> CONSTR
HeapRep False 1 0 Fun{} -> FUN_1_0
HeapRep False 0 1 Fun{} -> FUN_0_1
......@@ -451,10 +455,6 @@ rtsClosureType rep
HeapRep False _ _ ThunkSelector{} -> THUNK_SELECTOR
-- Approximation: we use the CONSTR_NOCAF_STATIC type for static
-- constructors -- that have no pointer words only.
HeapRep True 0 _ Constr{} -> CONSTR_NOCAF_STATIC -- See isStaticNoCafCon below
HeapRep True _ _ Constr{} -> CONSTR_STATIC
HeapRep True _ _ Fun{} -> FUN_STATIC
HeapRep True _ _ Thunk{} -> THUNK_STATIC
......@@ -472,6 +472,34 @@ aRG_GEN = ARG_GEN
aRG_GEN_BIG = ARG_GEN_BIG
{-
Note [static constructors]
~~~~~~~~~~~~~~~~~~~~~~~~~~
We used to have a CONSTR_STATIC closure type, and each constructor had
two info tables: one with CONSTR (or CONSTR_1_0 etc.), and one with
CONSTR_STATIC.
This distinction was removed, because when copying a data structure
into a compact region, we must copy static constructors into the
compact region too. If we didn't do this, we would need to track the
references from the compact region out to the static constructors,
because they might (indirectly) refer to CAFs.
Since static constructors will be copied to the heap, if we wanted to
use different info tables for static and dynamic constructors, we
would have to switch the info pointer when copying the constructor
into the compact region, which means we would need an extra field of
the static info table to point to the dynamic one.
However, since the distinction between static and dynamic closure
types is never actually needed (other than for assertions), we can
just drop the distinction and use the same info table for both.
The GC *does* need to distinguish between static and dynamic closures,
but it does this using the HEAP_ALLOCED() macro which checks whether
the address of the closure resides within the dynamic heap.
HEAP_ALLOCED() doesn't read the closure's info table.
Note [Static NoCaf constructors]
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
If we know that a top-level binding 'x' is not Caffy (ie no CAFs are
......
......@@ -226,41 +226,31 @@ cgDataCon data_con
nonptr_wds = tot_wds - ptr_wds
sta_info_tbl = mkDataConInfoTable dflags data_con True ptr_wds nonptr_wds
dyn_info_tbl = mkDataConInfoTable dflags data_con False ptr_wds nonptr_wds
emit_info info_tbl ticky_code
= emitClosureAndInfoTable info_tbl NativeDirectCall []
$ mk_code ticky_code
mk_code ticky_code
= -- NB: the closure pointer is assumed *untagged* on
-- entry to a constructor. If the pointer is tagged,
-- then we should not be entering it. This assumption
-- is used in ldvEnter and when tagging the pointer to
-- return it.
-- NB 2: We don't set CC when entering data (WDP 94/06)
do { _ <- ticky_code
; ldvEnter (CmmReg nodeReg)
; tickyReturnOldCon (length arg_reps)
; void $ emitReturn [cmmOffsetB dflags (CmmReg nodeReg) (tagForCon dflags data_con)]
}
-- The case continuation code expects a tagged pointer
dyn_info_tbl =
mkDataConInfoTable dflags data_con False ptr_wds nonptr_wds
-- We're generating info tables, so we don't know and care about
-- what the actual arguments are. Using () here as the place holder.
arg_reps :: [NonVoid PrimRep]
arg_reps = [NonVoid (typePrimRep rep_ty) | ty <- dataConRepArgTys data_con
, rep_ty <- repTypeArgs ty
, not (isVoidTy rep_ty)]
-- Dynamic closure code for non-nullary constructors only
; when (not (isNullaryRepDataCon data_con))
(emit_info dyn_info_tbl tickyEnterDynCon)
-- Dynamic-Closure first, to reduce forward references
; emit_info sta_info_tbl tickyEnterStaticCon }
arg_reps = [ NonVoid (typePrimRep rep_ty)
| ty <- dataConRepArgTys data_con
, rep_ty <- repTypeArgs ty
, not (isVoidTy rep_ty)]
; emitClosureAndInfoTable dyn_info_tbl NativeDirectCall [] $
-- NB: the closure pointer is assumed *untagged* on
-- entry to a constructor. If the pointer is tagged,
-- then we should not be entering it. This assumption
-- is used in ldvEnter and when tagging the pointer to
-- return it.
-- NB 2: We don't set CC when entering data (WDP 94/06)
do { tickyEnterDynCon
; ldvEnter (CmmReg nodeReg)
; tickyReturnOldCon (length arg_reps)
; void $ emitReturn [cmmOffsetB dflags (CmmReg nodeReg) (tagForCon dflags data_con)]
}
-- The case continuation code expects a tagged pointer
}
---------------------------------------------------------------
-- Stuff to support splitting
......
......@@ -1040,12 +1040,8 @@ mkDataConInfoTable dflags data_con is_static ptr_wds nonptr_wds
, cit_srt = NoC_SRT }
where
name = dataConName data_con
info_lbl | is_static = mkStaticInfoTableLabel name NoCafRefs
| otherwise = mkConInfoTableLabel name NoCafRefs
info_lbl = mkConInfoTableLabel name NoCafRefs
sm_rep = mkHeapRep dflags is_static ptr_wds nonptr_wds cl_type
cl_type = Constr (dataConTagZ data_con) (dataConIdentity data_con)
prof | not (gopt Opt_SccProfilingOn dflags) = NoProfilingInfo
......@@ -1074,16 +1070,10 @@ indStaticInfoTable
staticClosureNeedsLink :: Bool -> CmmInfoTable -> Bool
-- A static closure needs a link field to aid the GC when traversing
-- the static closure graph. But it only needs such a field if either
-- a) it has an SRT
-- a) it has an SRT
-- b) it's a constructor with one or more pointer fields
-- In case (b), the constructor's fields themselves play the role
-- of the SRT.
--
-- At this point, the cit_srt field has not been calculated (that
-- happens right at the end of the Cmm pipeline), but we do have the
-- VarSet of CAFs that CoreToStg attached, and if that is empty there
-- will definitely not be an SRT.
--
staticClosureNeedsLink has_srt CmmInfoTable{ cit_rep = smrep }
| isConRep smrep = not (isStaticNoCafCon smrep)
| otherwise = has_srt -- needsSRT (cit_srt info_tbl)
......@@ -191,7 +191,7 @@ getClosureData dflags a =
readCType :: Integral a => a -> ClosureType
readCType i
| i >= CONSTR && i <= CONSTR_NOCAF_STATIC = Constr
| i >= CONSTR && i <= CONSTR_NOCAF = Constr
| i >= FUN && i <= FUN_STATIC = Fun
| i >= THUNK && i < THUNK_SELECTOR = Thunk i'
| i == THUNK_SELECTOR = ThunkSelector
......
......@@ -1786,8 +1786,6 @@ SRT pointer.
\begin{itemize}
\item @isSTATIC@ is true for any statically allocated closure.
\item @isMUTABLE@ is true for objects with mutable pointer fields:
@MUT_ARR@s, @MUTVAR@s, @MVAR@s and @IVAR@s.
......
......@@ -18,71 +18,70 @@
*/
/* Object tag 0 raises an internal error */
#define INVALID_OBJECT 0
#define CONSTR 1
#define CONSTR_1_0 2
#define CONSTR_0_1 3
#define CONSTR_2_0 4
#define CONSTR_1_1 5
#define CONSTR_0_2 6
#define CONSTR_STATIC 7
#define CONSTR_NOCAF_STATIC 8
#define FUN 9
#define FUN_1_0 10
#define FUN_0_1 11
#define FUN_2_0 12
#define FUN_1_1 13
#define FUN_0_2 14
#define FUN_STATIC 15
#define THUNK 16
#define THUNK_1_0 17
#define THUNK_0_1 18
#define THUNK_2_0 19
#define THUNK_1_1 20
#define THUNK_0_2 21
#define THUNK_STATIC 22
#define THUNK_SELECTOR 23
#define BCO 24
#define AP 25
#define PAP 26
#define AP_STACK 27
#define IND 28
#define IND_STATIC 29
#define RET_BCO 30
#define RET_SMALL 31
#define RET_BIG 32
#define RET_FUN 33
#define UPDATE_FRAME 34
#define CATCH_FRAME 35
#define UNDERFLOW_FRAME 36
#define STOP_FRAME 37
#define BLOCKING_QUEUE 38
#define BLACKHOLE 39
#define MVAR_CLEAN 40
#define MVAR_DIRTY 41
#define TVAR 42
#define ARR_WORDS 43
#define MUT_ARR_PTRS_CLEAN 44
#define MUT_ARR_PTRS_DIRTY 45
#define MUT_ARR_PTRS_FROZEN0 46
#define MUT_ARR_PTRS_FROZEN 47
#define MUT_VAR_CLEAN 48
#define MUT_VAR_DIRTY 49
#define WEAK 50
#define PRIM 51
#define MUT_PRIM 52
#define TSO 53
#define STACK 54
#define TREC_CHUNK 55
#define ATOMICALLY_FRAME 56
#define CATCH_RETRY_FRAME 57
#define CATCH_STM_FRAME 58
#define WHITEHOLE 59
#define SMALL_MUT_ARR_PTRS_CLEAN 60
#define SMALL_MUT_ARR_PTRS_DIRTY 61
#define SMALL_MUT_ARR_PTRS_FROZEN0 62
#define SMALL_MUT_ARR_PTRS_FROZEN 63
#define COMPACT_NFDATA 64
#define N_CLOSURE_TYPES 65
#define INVALID_OBJECT 0
#define CONSTR 1
#define CONSTR_1_0 2
#define CONSTR_0_1 3
#define CONSTR_2_0 4
#define CONSTR_1_1 5
#define CONSTR_0_2 6
#define CONSTR_NOCAF 7
#define FUN 8
#define FUN_1_0 9
#define FUN_0_1 10
#define FUN_2_0 11
#define FUN_1_1 12
#define FUN_0_2 13
#define FUN_STATIC 14
#define THUNK 15
#define THUNK_1_0 16
#define THUNK_0_1 17
#define THUNK_2_0 18
#define THUNK_1_1 19
#define THUNK_0_2 20
#define THUNK_STATIC 21
#define THUNK_SELECTOR 22
#define BCO 23
#define AP 24
#define PAP 25
#define AP_STACK 26
#define IND 27
#define IND_STATIC 28
#define RET_BCO 29
#define RET_SMALL 30
#define RET_BIG 31
#define RET_FUN 32
#define UPDATE_FRAME 33
#define CATCH_FRAME 34
#define UNDERFLOW_FRAME 35
#define STOP_FRAME 36
#define BLOCKING_QUEUE 37
#define BLACKHOLE 38
#define MVAR_CLEAN 39
#define MVAR_DIRTY 40
#define TVAR 41
#define ARR_WORDS 42
#define MUT_ARR_PTRS_CLEAN 43
#define MUT_ARR_PTRS_DIRTY 44
#define MUT_ARR_PTRS_FROZEN0 45
#define MUT_ARR_PTRS_FROZEN 46
#define MUT_VAR_CLEAN 47
#define MUT_VAR_DIRTY 48
#define WEAK 49
#define PRIM 50
#define MUT_PRIM 51
#define TSO 52
#define STACK 53
#define TREC_CHUNK 54
#define ATOMICALLY_FRAME 55
#define CATCH_RETRY_FRAME 56
#define CATCH_STM_FRAME 57
#define WHITEHOLE 58
#define SMALL_MUT_ARR_PTRS_CLEAN 59
#define SMALL_MUT_ARR_PTRS_DIRTY 60
#define SMALL_MUT_ARR_PTRS_FROZEN0 61
#define SMALL_MUT_ARR_PTRS_FROZEN 62
#define COMPACT_NFDATA 63
#define N_CLOSURE_TYPES 64
#endif /* RTS_STORAGE_CLOSURETYPES_H */
......@@ -57,14 +57,12 @@ typedef struct {
#define _HNF (1<<0) /* head normal form? */
#define _BTM (1<<1) /* uses info->layout.bitmap */
#define _NS (1<<2) /* non-sparkable */
#define _STA (1<<3) /* static? */
#define _THU (1<<4) /* thunk? */
#define _MUT (1<<5) /* mutable? */
#define _UPT (1<<6) /* unpointed? */
#define _SRT (1<<7) /* has an SRT? */
#define _IND (1<<8) /* is an indirection? */
#define isSTATIC(flags) ((flags) &_STA)
#define _THU (1<<3) /* thunk? */
#define _MUT (1<<4) /* mutable? */
#define _UPT (1<<5) /* unpointed? */
#define _SRT (1<<6) /* has an SRT? */
#define _IND (1<<7) /* is an indirection? */
#define isMUTABLE(flags) ((flags) &_MUT)
#define isBITMAP(flags) ((flags) &_BTM)
#define isTHUNK(flags) ((flags) &_THU)
......@@ -80,7 +78,6 @@ extern StgWord16 closure_flags[];
#define closure_BITMAP(c) ( closureFlags(c) & _BTM)
#define closure_NON_SPARK(c) ( (closureFlags(c) & _NS))
#define closure_SHOULD_SPARK(c) (!(closureFlags(c) & _NS))
#define closure_STATIC(c) ( closureFlags(c) & _STA)
#define closure_THUNK(c) ( closureFlags(c) & _THU)
#define closure_MUTABLE(c) ( closureFlags(c) & _MUT)
#define closure_UNPOINTED(c) ( closureFlags(c) & _UPT)
......@@ -93,7 +90,6 @@ extern StgWord16 closure_flags[];
#define ip_HNF(ip) ( ipFlags(ip) & _HNF)
#define ip_BITMAP(ip) ( ipFlags(ip) & _BTM)
#define ip_SHOULD_SPARK(ip) (!(ipFlags(ip) & _NS))
#define ip_STATIC(ip) ( ipFlags(ip) & _STA)
#define ip_THUNK(ip) ( ipFlags(ip) & _THU)
#define ip_MUTABLE(ip) ( ipFlags(ip) & _MUT)
#define ip_UNPOINTED(ip) ( ipFlags(ip) & _UPT)
......
......@@ -122,13 +122,14 @@ static void searchHeapBlocks (HashTable *addrs, bdescr *bd)
size = sizeofW(StgThunkHeader) + 1;
break;
case CONSTR:
case FUN:
case FUN_1_0:
case FUN_0_1:
case FUN_1_1:
case FUN_0_2:
case FUN_2_0:
case CONSTR:
case CONSTR_NOCAF:
case CONSTR_1_0:
case CONSTR_0_1:
case CONSTR_1_1:
......
......@@ -18,76 +18,75 @@ StgWord16 closure_flags[] = {
* to thunks.)
*/
/* 0 1 2 3 4 5 6 7 8 */
/* HNF BTM NS STA THU MUT UPT SRT IND */
/* 0 1 2 4 5 6 7 8 */
/* HNF BTM NS THU MUT UPT SRT IND */
[INVALID_OBJECT] = ( 0 ),
[CONSTR] = (_HNF| _NS ),
[CONSTR_1_0] = (_HNF| _NS ),
[CONSTR_0_1] = (_HNF| _NS ),
[CONSTR_2_0] = (_HNF| _NS ),
[CONSTR_1_1] = (_HNF| _NS ),
[CONSTR_0_2] = (_HNF| _NS ),
[CONSTR_STATIC] = (_HNF| _NS|_STA ),
[CONSTR_NOCAF_STATIC] = (_HNF| _NS|_STA ),
[FUN] = (_HNF| _NS| _SRT ),
[FUN_1_0] = (_HNF| _NS| _SRT ),
[FUN_0_1] = (_HNF| _NS| _SRT ),
[FUN_2_0] = (_HNF| _NS| _SRT ),
[FUN_1_1] = (_HNF| _NS| _SRT ),
[FUN_0_2] = (_HNF| _NS| _SRT ),
[FUN_STATIC] = (_HNF| _NS|_STA| _SRT ),
[THUNK] = ( _THU| _SRT ),
[THUNK_1_0] = ( _THU| _SRT ),
[THUNK_0_1] = ( _THU| _SRT ),
[THUNK_2_0] = ( _THU| _SRT ),
[THUNK_1_1] = ( _THU| _SRT ),
[THUNK_0_2] = ( _THU| _SRT ),
[THUNK_STATIC] = ( _STA|_THU| _SRT ),
[THUNK_SELECTOR] = ( _THU| _SRT ),
[BCO] = (_HNF| _NS ),
[AP] = ( _THU ),
[PAP] = (_HNF| _NS ),
[AP_STACK] = ( _THU ),
[IND] = ( _NS| _IND ),
[IND_STATIC] = ( _NS|_STA| _IND ),
[RET_BCO] = ( 0 ),
[RET_SMALL] = ( _BTM| _SRT ),
[RET_BIG] = ( _SRT ),
[RET_FUN] = ( 0 ),
[UPDATE_FRAME] = ( _BTM ),
[CATCH_FRAME] = ( _BTM ),
[UNDERFLOW_FRAME] = ( _BTM ),
[STOP_FRAME] = ( _BTM ),
[BLACKHOLE] = ( _NS| _UPT ),
[BLOCKING_QUEUE] = ( _NS| _MUT|_UPT ),
[MVAR_CLEAN] = (_HNF| _NS| _MUT|_UPT ),
[MVAR_DIRTY] = (_HNF| _NS| _MUT|_UPT ),
[TVAR] = (_HNF| _NS| _MUT|_UPT ),
[ARR_WORDS] = (_HNF| _NS| _UPT ),
[MUT_ARR_PTRS_CLEAN] = (_HNF| _NS| _MUT|_UPT ),
[MUT_ARR_PTRS_DIRTY] = (_HNF| _NS| _MUT|_UPT ),
[MUT_ARR_PTRS_FROZEN0] = (_HNF| _NS| _MUT|_UPT ),
[MUT_ARR_PTRS_FROZEN] = (_HNF| _NS| _UPT ),
[MUT_VAR_CLEAN] = (_HNF| _NS| _MUT|_UPT ),
[MUT_VAR_DIRTY] = (_HNF| _NS| _MUT|_UPT ),
[WEAK] = (_HNF| _NS| _UPT ),
[PRIM] = (_HNF| _NS| _UPT ),
[MUT_PRIM] = (_HNF| _NS| _MUT|_UPT ),
[TSO] = (_HNF| _NS| _MUT|_UPT ),
[STACK] = (_HNF| _NS| _MUT|_UPT ),
[TREC_CHUNK] = ( _NS| _MUT|_UPT ),
[ATOMICALLY_FRAME] = ( _BTM ),
[CATCH_RETRY_FRAME] = ( _BTM ),
[CATCH_STM_FRAME] = ( _BTM ),
[WHITEHOLE] = ( 0 ),
[SMALL_MUT_ARR_PTRS_CLEAN] = (_HNF| _NS| _MUT|_UPT ),
[SMALL_MUT_ARR_PTRS_DIRTY] = (_HNF| _NS| _MUT|_UPT ),
[SMALL_MUT_ARR_PTRS_FROZEN0] = (_HNF| _NS| _MUT|_UPT ),
[SMALL_MUT_ARR_PTRS_FROZEN] = (_HNF| _NS| _UPT ),
[INVALID_OBJECT] = ( 0 ),
[CONSTR] = (_HNF| _NS ),
[CONSTR_1_0] = (_HNF| _NS ),
[CONSTR_0_1] = (_HNF| _NS ),
[CONSTR_2_0] = (_HNF| _NS ),
[CONSTR_1_1] = (_HNF| _NS ),
[CONSTR_0_2] = (_HNF| _NS ),
[CONSTR_NOCAF] = (_HNF| _NS ),
[FUN] = (_HNF| _NS| _SRT ),
[FUN_1_0] = (_HNF| _NS| _SRT ),
[FUN_0_1] = (_HNF| _NS| _SRT ),
[FUN_2_0] = (_HNF| _NS| _SRT ),
[FUN_1_1] = (_HNF| _NS| _SRT ),
[FUN_0_2] = (_HNF| _NS| _SRT ),
[FUN_STATIC] = (_HNF| _NS| _SRT ),
[THUNK] = ( _THU| _SRT ),
[THUNK_1_0] = ( _THU| _SRT ),
[THUNK_0_1] = ( _THU| _SRT ),
[THUNK_2_0] = ( _THU| _SRT ),
[THUNK_1_1] = ( _THU| _SRT ),
[THUNK_0_2] = ( _THU| _SRT ),
[THUNK_STATIC] = ( _THU| _SRT ),
[THUNK_SELECTOR] = ( _THU| _SRT ),
[BCO] = (_HNF| _NS ),
[AP] = ( _THU ),
[PAP] = (_HNF| _NS ),
[AP_STACK] = ( _THU ),
[IND] = ( _NS| _IND ),
[IND_STATIC] = ( _NS| _IND ),
[RET_BCO] = ( 0 ),
[RET_SMALL] = ( _BTM| _SRT ),
[RET_BIG] = ( _SRT ),
[RET_FUN] = ( 0 ),
[UPDATE_FRAME] = ( _BTM ),
[CATCH_FRAME] = ( _BTM ),
[UNDERFLOW_FRAME] = ( _BTM ),
[STOP_FRAME] = ( _BTM ),
[BLACKHOLE] = ( _NS| _UPT ),
[BLOCKING_QUEUE] = ( _NS| _MUT|_UPT ),
[MVAR_CLEAN] = (_HNF| _NS| _MUT|_UPT ),
[MVAR_DIRTY] = (_HNF| _NS| _MUT|_UPT ),
[TVAR] = (_HNF| _NS| _MUT|_UPT ),
[ARR_WORDS] = (_HNF| _NS| _UPT ),
[MUT_ARR_PTRS_CLEAN] = (_HNF| _NS| _MUT|_UPT ),
[MUT_ARR_PTRS_DIRTY] = (_HNF| _NS| _MUT|_UPT ),
[MUT_ARR_PTRS_FROZEN0] = (_HNF| _NS| _MUT|_UPT ),
[MUT_ARR_PTRS_FROZEN] = (_HNF| _NS| _UPT ),
[MUT_VAR_CLEAN] = (_HNF| _NS| _MUT|_UPT ),
[MUT_VAR_DIRTY] = (_HNF| _NS| _MUT|_UPT ),
[WEAK] = (_HNF| _NS| _UPT ),
[PRIM] = (_HNF| _NS| _UPT ),
[MUT_PRIM] = (_HNF| _NS| _MUT|_UPT ),
[TSO] = (_HNF| _NS| _MUT|_UPT ),
[STACK] = (_HNF| _NS| _MUT|_UPT ),
[TREC_CHUNK] = ( _NS| _MUT|_UPT ),
[ATOMICALLY_FRAME] = ( _BTM ),
[CATCH_RETRY_FRAME] = ( _BTM ),
[CATCH_STM_FRAME] = ( _BTM ),
[WHITEHOLE] = ( 0 ),
[SMALL_MUT_ARR_PTRS_CLEAN] = (_HNF| _NS| _MUT|_UPT ),
[SMALL_MUT_ARR_PTRS_DIRTY] = (_HNF| _NS| _MUT|_UPT ),
[SMALL_MUT_ARR_PTRS_FROZEN0] = (_HNF| _NS| _MUT|_UPT ),
[SMALL_MUT_ARR_PTRS_FROZEN] = (_HNF| _NS| _UPT ),
[COMPACT_NFDATA] = (_HNF| _NS ),
};
#if N_CLOSURE_TYPES != 65
#if N_CLOSURE_TYPES != 64
#error Closure types changed: update ClosureFlags.c!
#endif
......@@ -342,8 +342,7 @@ eval_obj:
case CONSTR_2_0:
case CONSTR_1_1:
case CONSTR_0_2:
case CONSTR_STATIC:
case CONSTR_NOCAF_STATIC:
case CONSTR_NOCAF:
case FUN:
case FUN_1_0:
case FUN_0_1:
......
......@@ -128,10 +128,9 @@ processHeapClosureForDead( const StgClosure *c )
*/
// static objects
case IND_STATIC:
case CONSTR_STATIC:
case FUN_STATIC:
case THUNK_STATIC:
case CONSTR_NOCAF_STATIC:
case CONSTR_NOCAF:
// stack objects
case UPDATE_FRAME:
case CATCH_FRAME:
......
......@@ -53,22 +53,6 @@ PRELUDE_CLOSURE(base_GHCziConcziSignal_runHandlersPtr_closure);
PRELUDE_CLOSURE(base_GHCziTopHandler_flushStdHandles_closure);
PRELUDE_INFO(ghczmprim_GHCziTypes_Czh_static_info);
PRELUDE_INFO(ghczmprim_GHCziTypes_Izh_static_info);
PRELUDE_INFO(ghczmprim_GHCziTypes_Fzh_static_info);
PRELUDE_INFO(ghczmprim_GHCziTypes_Dzh_static_info);
PRELUDE_INFO(base_Addr_Azh_static_info);
PRELUDE_INFO(base_GHCziPtr_Ptr_static_info);
PRELUDE_INFO(base_GHCziPtr_FunPtr_static_info);
PRELUDE_INFO(base_GHCziInt_I8zh_static_info);
PRELUDE_INFO(base_GHCziInt_I16zh_static_info);
PRELUDE_INFO(base_GHCziInt_I32zh_static_info);
PRELUDE_INFO(base_GHCziInt_I64zh_static_info);
PRELUDE_INFO(ghczmprim_GHCziTypes_Wzh_static_info);
PRELUDE_INFO(base_GHCziWord_W8zh_static_info);
PRELUDE_INFO(base_GHCziWord_W16zh_static_info);
PRELUDE_INFO(base_GHCziWord_W32zh_static_info);
PRELUDE_INFO(base_GHCziWord_W64zh_static_info);
PRELUDE_INFO(ghczmprim_GHCziTypes_Czh_con_info);
PRELUDE_INFO(ghczmprim_GHCziTypes_Izh_con_info);
PRELUDE_INFO(ghczmprim_GHCziTypes_Fzh_con_info);
......@@ -85,7 +69,6 @@ PRELUDE_INFO(base_GHCziWord_W8zh_con_info);
PRELUDE_INFO(base_GHCziWord_W16zh_con_info);
PRELUDE_INFO(base_GHCziWord_W32zh_con_info);
PRELUDE_INFO(base_GHCziWord_W64zh_con_info);
PRELUDE_INFO(base_GHCziStable_StablePtr_static_info);
PRELUDE_INFO(base_GHCziStable_StablePtr_con_info);
#define Unit_closure DLL_IMPORT_DATA_REF(ghczmprim_GHCziTuple_Z0T_closure)
......@@ -111,22 +94,6 @@ PRELUDE_INFO(base_GHCziStable_StablePtr_con_info);
#define nestedAtomically_closure DLL_IMPORT_DATA_REF(base_ControlziExceptionziBase_nestedAtomically_closure)
#define blockedOnBadFD_closure DLL_IMPORT_DATA_REF(base_GHCziEventziThread_blockedOnBadFD_closure)
#define Czh_static_info DLL_IMPORT_DATA_REF(ghczmprim_GHCziTypes_Czh_static_info)
#define Fzh_static_info DLL_IMPORT_DATA_REF(ghczmprim_GHCziTypes_Fzh_static_info)
#define Dzh_static_info DLL_IMPORT_DATA_REF(ghczmprim_GHCziTypes_Dzh_static_info)
#define Azh_static_info DLL_IMPORT_DATA_REF(base_Addr_Azh_static_info)
#define Izh_static_info DLL_IMPORT_DATA_REF(ghczmprim_GHCziTypes_Izh_static_info)
#define I8zh_static_info DLL_IMPORT_DATA_REF(base_GHCziInt_I8zh_static_info)
#define I16zh_static_info DLL_IMPORT_DATA_REF(base_GHCziInt_I16zh_static_info)
#define I32zh_static_info DLL_IMPORT_DATA_REF(base_GHCziInt_I32zh_static_info)
#define I64zh_static_info DLL_IMPORT_DATA_REF(base_GHCziInt_I64zh_static_info)
#define Wzh_static_info DLL_IMPORT_DATA_REF(ghczmprim_GHCziTypes_Wzh_static_info)
#define W8zh_static_info DLL_IMPORT_DATA_REF(base_GHCziWord_W8zh_static_info)
#define W16zh_static_info DLL_IMPORT_DATA_REF(base_GHCziWord_W16zh_static_info)
#define W32zh_static_info DLL_IMPORT_DATA_REF(base_GHCziWord_W32zh_static_info)
#define W64zh_static_info DLL_IMPORT_DATA_REF(base_GHCziWord_W64zh_static_info)
#define Ptr_static_info DLL_IMPORT_DATA_REF(base_GHCziPtr_Ptr_static_info)
#define FunPtr_static_info DLL_IMPORT_DATA_REF(base_GHCziPtr_FunPtr_static_info)
#define Czh_con_info DLL_IMPORT_DATA_REF(ghczmprim_GHCziTypes_Czh_con_info)
#define Izh_con_info DLL_IMPORT_DATA_REF(ghczmprim_GHCziTypes_Izh_con_info)
#define Fzh_con_info DLL_IMPORT_DATA_REF(ghczmprim_GHCziTypes_Fzh_con_info)
......
......@@ -122,8 +122,7 @@ printClosure( const StgClosure *obj )
case CONSTR:
case CONSTR_1_0: case CONSTR_0_1:
case CONSTR_1_1: case CONSTR_0_2: case CONSTR_2_0:
case CONSTR_STATIC:
case CONSTR_NOCAF_STATIC:
case CONSTR_NOCAF:
{
StgWord i, j;
const StgConInfoTable *con_info = get_con_itbl (obj);
......@@ -827,8 +826,7 @@ const char *closure_type_names[] = {
[CONSTR_2_0] = "CONSTR_2_0",
[CONSTR_1_1] = "CONSTR_1_1",
[CONSTR_0_2] = "CONSTR_0_2",
[CONSTR_STATIC] = "CONSTR_STATIC",
[CONSTR_NOCAF_STATIC] = "CONSTR_NOCAF_STATIC",
[CONSTR_NOCAF] = "CONSTR_NOCAF",
[FUN] = "FUN",
[FUN_1_0] = "FUN_1_0",
[FUN_0_1] = "FUN_0_1",
......
......@@ -139,8 +139,7 @@ closureIdentity( const StgClosure *p )
case CONSTR_2_0:
case CONSTR_1_1:
case CONSTR_0_2: