summaryrefslogtreecommitdiff
path: root/includes
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 /includes
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 'includes')
-rw-r--r--includes/rts/storage/ClosureTypes.h131
-rw-r--r--includes/rts/storage/InfoTables.h16
2 files changed, 71 insertions, 76 deletions
diff --git a/includes/rts/storage/ClosureTypes.h b/includes/rts/storage/ClosureTypes.h
index f5e96e7500..234e00b174 100644
--- a/includes/rts/storage/ClosureTypes.h
+++ b/includes/rts/storage/ClosureTypes.h
@@ -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 */
diff --git a/includes/rts/storage/InfoTables.h b/includes/rts/storage/InfoTables.h
index bb1bac0c65..87d0410937 100644
--- a/includes/rts/storage/InfoTables.h
+++ b/includes/rts/storage/InfoTables.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)