diff options
author | Edward Z. Yang <ezyang@mit.edu> | 2013-08-26 14:52:37 -0700 |
---|---|---|
committer | Edward Z. Yang <ezyang@cs.stanford.edu> | 2014-10-01 22:26:38 -0700 |
commit | 3b5a840bba375c4c4c11ccfeb283f84c3a1ef22c (patch) | |
tree | 0463f156f7ae946744de0cdcda2fb9ffc58f93f3 /rts/StgMiscClosures.cmm | |
parent | b23ba2a7d612c6b466521399b33fe9aacf5c4f75 (diff) | |
download | haskell-3b5a840bba375c4c4c11ccfeb283f84c3a1ef22c.tar.gz |
BC-breaking changes to C-- CLOSURE syntax.
Summary:
Previously, there were two variants of CLOSURE in C--:
- Top-level CLOSURE(foo_closure, foo, lits...), which defines a new
static closure and gives it a name, and
- Array CLOSURE(foo, lits...), which was used for the static char
and integer arrays.
They used the same name, were confusing, and didn't even generate
the correct internal label representation! So now, we have two
new forms:
- Top-level CLOSURE(foo, lits...) which automatically generates
foo_closure (along with foo_info, which we were doing already)
- Array ANONYMOUS_CLOSURE(foo, lits...) which doesn't generate
a foo_closure identifier.
Part of remove HEAP_ALLOCED patch set (#8199)
Signed-off-by: Edward Z. Yang <ezyang@mit.edu>
Test Plan: validate
Reviewers: simonmar, austin
Subscribers: simonmar, ezyang, carter, thomie
Differential Revision: https://phabricator.haskell.org/D264
GHC Trac Issues: #8199
Diffstat (limited to 'rts/StgMiscClosures.cmm')
-rw-r--r-- | rts/StgMiscClosures.cmm | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/rts/StgMiscClosures.cmm b/rts/StgMiscClosures.cmm index 42ef39e134..85ecb5e0e3 100644 --- a/rts/StgMiscClosures.cmm +++ b/rts/StgMiscClosures.cmm @@ -457,7 +457,7 @@ INFO_TABLE_CONSTR(stg_C_FINALIZER_LIST,1,4,0,CONSTR,"C_FINALIZER_LIST","C_FINALI INFO_TABLE_CONSTR(stg_NO_FINALIZER,0,0,0,CONSTR_NOCAF_STATIC,"NO_FINALIZER","NO_FINALIZER") { foreign "C" barf("NO_FINALIZER object entered!") never returns; } -CLOSURE(stg_NO_FINALIZER_closure,stg_NO_FINALIZER); +CLOSURE(stg_NO_FINALIZER); /* ---------------------------------------------------------------------------- Stable Names are unlifted too. @@ -516,13 +516,13 @@ INFO_TABLE_CONSTR(stg_END_STM_CHUNK_LIST,0,0,0,CONSTR_NOCAF_STATIC,"END_STM_CHUN INFO_TABLE_CONSTR(stg_NO_TREC,0,0,0,CONSTR_NOCAF_STATIC,"NO_TREC","NO_TREC") { foreign "C" barf("NO_TREC object entered!") never returns; } -CLOSURE(stg_END_STM_WATCH_QUEUE_closure,stg_END_STM_WATCH_QUEUE); +CLOSURE(stg_END_STM_WATCH_QUEUE); -CLOSURE(stg_END_INVARIANT_CHECK_QUEUE_closure,stg_END_INVARIANT_CHECK_QUEUE); +CLOSURE(stg_END_INVARIANT_CHECK_QUEUE); -CLOSURE(stg_END_STM_CHUNK_LIST_closure,stg_END_STM_CHUNK_LIST); +CLOSURE(stg_END_STM_CHUNK_LIST); -CLOSURE(stg_NO_TREC_closure,stg_NO_TREC); +CLOSURE(stg_NO_TREC); /* ---------------------------------------------------------------------------- Messages @@ -553,7 +553,7 @@ INFO_TABLE_CONSTR(stg_MSG_NULL,1,0,0,PRIM,"MSG_NULL","MSG_NULL") INFO_TABLE_CONSTR(stg_END_TSO_QUEUE,0,0,0,CONSTR_NOCAF_STATIC,"END_TSO_QUEUE","END_TSO_QUEUE") { foreign "C" barf("END_TSO_QUEUE object entered!") never returns; } -CLOSURE(stg_END_TSO_QUEUE_closure,stg_END_TSO_QUEUE); +CLOSURE(stg_END_TSO_QUEUE); /* ---------------------------------------------------------------------------- GCD_CAF @@ -572,7 +572,7 @@ INFO_TABLE_CONSTR(stg_GCD_CAF,0,0,0,CONSTR_NOCAF_STATIC,"GCD_CAF","GCD_CAF") INFO_TABLE_CONSTR(stg_STM_AWOKEN,0,0,0,CONSTR_NOCAF_STATIC,"STM_AWOKEN","STM_AWOKEN") { foreign "C" barf("STM_AWOKEN object entered!") never returns; } -CLOSURE(stg_STM_AWOKEN_closure,stg_STM_AWOKEN); +CLOSURE(stg_STM_AWOKEN); /* ---------------------------------------------------------------------------- Arrays @@ -638,7 +638,7 @@ INFO_TABLE( stg_dummy_ret, 0, 0, CONSTR_NOCAF_STATIC, "DUMMY_RET", "DUMMY_RET") { return (); } -CLOSURE(stg_dummy_ret_closure,stg_dummy_ret); +CLOSURE(stg_dummy_ret); /* ---------------------------------------------------------------------------- MVAR_TSO_QUEUE @@ -673,8 +673,8 @@ INFO_TABLE_CONSTR(stg_MVAR_TSO_QUEUE,2,0,0,PRIM,"MVAR_TSO_QUEUE","MVAR_TSO_QUEUE #endif -#define CHARLIKE_HDR(n) CLOSURE(Char_hash_static_info, n) -#define INTLIKE_HDR(n) CLOSURE(Int_hash_static_info, n) +#define CHARLIKE_HDR(n) ANONYMOUS_CLOSURE(Char_hash_static_info, n) +#define INTLIKE_HDR(n) ANONYMOUS_CLOSURE(Int_hash_static_info, n) /* put these in the *data* section, since the garbage collector relies * on the fact that static closures live in the data section. |