summaryrefslogtreecommitdiff
path: root/rts/ClosureFlags.c
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2009-08-03 20:11:48 +0000
committerSimon Marlow <marlowsd@gmail.com>2009-08-03 20:11:48 +0000
commit9b266fba8f18f9f8a469bbe0b51b80a91217f1ab (patch)
tree0fc791dcae793ef0bd657054d93e85d979dc668e /rts/ClosureFlags.c
parent0d8273d3a021b426962ec160fc224bc9aadc6a0d (diff)
downloadhaskell-9b266fba8f18f9f8a469bbe0b51b80a91217f1ab.tar.gz
use C99-style array initialisers
Diffstat (limited to 'rts/ClosureFlags.c')
-rw-r--r--rts/ClosureFlags.c145
1 files changed, 70 insertions, 75 deletions
diff --git a/rts/ClosureFlags.c b/rts/ClosureFlags.c
index 05baad72d4..bbe0e8ffed 100644
--- a/rts/ClosureFlags.c
+++ b/rts/ClosureFlags.c
@@ -11,11 +11,6 @@
StgWord16 closure_flags[] = {
-/*
- * These *must* be in the same order as the closure types in
- * ClosureTypes.h.
- */
-
/* ToDo: some of these flags seem to be duplicated.
* - NS is the same as HNF, and the negation of THU
* (however, we set NS for indirections, which is probably the
@@ -26,76 +21,76 @@ StgWord16 closure_flags[] = {
/* 0 1 2 3 4 5 6 7 8 */
/* HNF BTM NS STA 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 = */ ( _BTM| _THU| _SRT ),
-/* THUNK_1_0 = */ ( _BTM| _THU| _SRT ),
-/* THUNK_0_1 = */ ( _BTM| _THU| _SRT ),
-/* THUNK_2_0 = */ ( _BTM| _THU| _SRT ),
-/* THUNK_1_1 = */ ( _BTM| _THU| _SRT ),
-/* THUNK_0_2 = */ ( _BTM| _THU| _SRT ),
-/* THUNK_STATIC = */ ( _BTM| _STA|_THU| _SRT ),
-/* THUNK_SELECTOR = */ ( _BTM| _THU| _SRT ),
-/* BCO = */ (_HNF| _NS ),
-/* AP = */ ( _THU ),
-/* PAP = */ (_HNF| _NS ),
-/* AP_STACK = */ ( _THU ),
-/* IND = */ ( _NS| _IND ),
-/* IND_OLDGEN = */ ( _NS| _IND ),
-/* IND_PERM = */ ( _NS| _IND ),
-/* IND_OLDGEN_PERM = */ ( _NS| _IND ),
-/* IND_STATIC = */ ( _NS|_STA| _IND ),
-/* RET_BCO = */ ( _BTM ),
-/* RET_SMALL = */ ( _BTM| _SRT ),
-/* RET_BIG = */ ( _SRT ),
-/* RET_DYN = */ ( _SRT ),
-/* RET_FUN = */ ( 0 ),
-/* UPDATE_FRAME = */ ( _BTM ),
-/* CATCH_FRAME = */ ( _BTM ),
-/* STOP_FRAME = */ ( _BTM ),
-/* CAF_BLACKHOLE = */ ( _BTM|_NS| _UPT ),
-/* BLACKHOLE = */ ( _NS| _UPT ),
-/* MVAR_CLEAN = */ (_HNF| _NS| _MUT|_UPT ),
-/* MVAR_DIRTY = */ (_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 ),
-/* STABLE_NAME = */ (_HNF| _NS| _UPT ),
-/* TSO = */ (_HNF| _NS| _MUT|_UPT ),
-/* BLOCKED_FETCH = */ (_HNF| _NS| _MUT|_UPT ),
-/* FETCH_ME = */ (_HNF| _NS| _MUT|_UPT ),
-/* FETCH_ME_BQ = */ ( _NS| _MUT|_UPT ),
-/* RBH = */ ( _NS| _MUT|_UPT ),
-/* REMOTE_REF = */ (_HNF| _NS| _UPT ),
-/* TVAR_WATCH_QUEUE = */ ( _NS| _MUT|_UPT ),
-/* INVARIANT_CHECK_QUEUE= */ ( _NS| _MUT|_UPT ),
-/* ATOMIC_INVARIANT = */ ( _NS| _MUT|_UPT ),
-/* TVAR = */ (_HNF| _NS| _MUT|_UPT ),
-/* TREC_CHUNK = */ ( _NS| _MUT|_UPT ),
-/* TREC_HEADER = */ ( _NS| _MUT|_UPT ),
-/* ATOMICALLY_FRAME = */ ( _BTM ),
-/* CATCH_RETRY_FRAME = */ ( _BTM ),
-/* CATCH_STM_FRAME = */ ( _BTM ),
-/* WHITEHOLE = */ ( 0 )
+ [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] = ( _BTM| _THU| _SRT ),
+ [THUNK_1_0] = ( _BTM| _THU| _SRT ),
+ [THUNK_0_1] = ( _BTM| _THU| _SRT ),
+ [THUNK_2_0] = ( _BTM| _THU| _SRT ),
+ [THUNK_1_1] = ( _BTM| _THU| _SRT ),
+ [THUNK_0_2] = ( _BTM| _THU| _SRT ),
+ [THUNK_STATIC] = ( _BTM| _STA|_THU| _SRT ),
+ [THUNK_SELECTOR] = ( _BTM| _THU| _SRT ),
+ [BCO] = (_HNF| _NS ),
+ [AP] = ( _THU ),
+ [PAP] = (_HNF| _NS ),
+ [AP_STACK] = ( _THU ),
+ [IND] = ( _NS| _IND ),
+ [IND_OLDGEN] = ( _NS| _IND ),
+ [IND_PERM] = ( _NS| _IND ),
+ [IND_OLDGEN_PERM] = ( _NS| _IND ),
+ [IND_STATIC] = ( _NS|_STA| _IND ),
+ [RET_BCO] = ( _BTM ),
+ [RET_SMALL] = ( _BTM| _SRT ),
+ [RET_BIG] = ( _SRT ),
+ [RET_DYN] = ( _SRT ),
+ [RET_FUN] = ( 0 ),
+ [UPDATE_FRAME] = ( _BTM ),
+ [CATCH_FRAME] = ( _BTM ),
+ [STOP_FRAME] = ( _BTM ),
+ [CAF_BLACKHOLE] = ( _BTM|_NS| _UPT ),
+ [BLACKHOLE] = ( _NS| _UPT ),
+ [MVAR_CLEAN] = (_HNF| _NS| _MUT|_UPT ),
+ [MVAR_DIRTY] = (_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 ),
+ [STABLE_NAME] = (_HNF| _NS| _UPT ),
+ [TSO] = (_HNF| _NS| _MUT|_UPT ),
+ [BLOCKED_FETCH] = (_HNF| _NS| _MUT|_UPT ),
+ [FETCH_ME] = (_HNF| _NS| _MUT|_UPT ),
+ [FETCH_ME_BQ] = ( _NS| _MUT|_UPT ),
+ [RBH] = ( _NS| _MUT|_UPT ),
+ [REMOTE_REF] = (_HNF| _NS| _UPT ),
+ [TVAR_WATCH_QUEUE] = ( _NS| _MUT|_UPT ),
+ [INVARIANT_CHECK_QUEUE]= ( _NS| _MUT|_UPT ),
+ [ATOMIC_INVARIANT] = ( _NS| _MUT|_UPT ),
+ [TVAR] = (_HNF| _NS| _MUT|_UPT ),
+ [TREC_CHUNK] = ( _NS| _MUT|_UPT ),
+ [TREC_HEADER] = ( _NS| _MUT|_UPT ),
+ [ATOMICALLY_FRAME] = ( _BTM ),
+ [CATCH_RETRY_FRAME] = ( _BTM ),
+ [CATCH_STM_FRAME] = ( _BTM ),
+ [WHITEHOLE] = ( 0 )
};
#if N_CLOSURE_TYPES != 70