summaryrefslogtreecommitdiff
path: root/rts/ClosureFlags.c
diff options
context:
space:
mode:
authorSimon Marlow <marlowsd@gmail.com>2016-11-09 09:20:02 +0000
committerSimon Marlow <marlowsd@gmail.com>2016-11-14 14:43:35 +0000
commit55d535da10dd63bbaf03fb176ced7179087cd0d4 (patch)
tree57bdbf04381fe08d90c384f5b10e77c3384227d9 /rts/ClosureFlags.c
parent6c0f10fac767c49b65ed71e8eb8e78ca4f9062d5 (diff)
downloadhaskell-55d535da10dd63bbaf03fb176ced7179087cd0d4.tar.gz
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
Diffstat (limited to 'rts/ClosureFlags.c')
-rw-r--r--rts/ClosureFlags.c133
1 files changed, 66 insertions, 67 deletions
diff --git a/rts/ClosureFlags.c b/rts/ClosureFlags.c
index b2359107a5..9bf301552d 100644
--- a/rts/ClosureFlags.c
+++ b/rts/ClosureFlags.c
@@ -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