summaryrefslogtreecommitdiff
path: root/rts/sm/Evac.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/sm/Evac.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/sm/Evac.c')
-rw-r--r--rts/sm/Evac.c13
1 files changed, 9 insertions, 4 deletions
diff --git a/rts/sm/Evac.c b/rts/sm/Evac.c
index 1f9c5cc8cd..1323cbea6a 100644
--- a/rts/sm/Evac.c
+++ b/rts/sm/Evac.c
@@ -548,11 +548,16 @@ loop:
evacuate_static_object(IND_STATIC_LINK((StgClosure *)q), q);
return;
- case CONSTR_STATIC:
+ case CONSTR:
+ case CONSTR_1_0:
+ case CONSTR_2_0:
+ case CONSTR_1_1:
evacuate_static_object(STATIC_LINK(info,(StgClosure *)q), q);
return;
- case CONSTR_NOCAF_STATIC:
+ case CONSTR_0_1:
+ case CONSTR_0_2:
+ case CONSTR_NOCAF:
/* no need to put these on the static linked list, they don't need
* to be scavenged.
*/
@@ -716,6 +721,7 @@ loop:
case FUN:
case CONSTR:
+ case CONSTR_NOCAF:
copy_tag_nolock(p,info,q,sizeW_fromITBL(INFO_PTR_TO_STRUCT(info)),gen_no,tag);
return;
@@ -1048,8 +1054,7 @@ selector_loop:
case CONSTR_2_0:
case CONSTR_1_1:
case CONSTR_0_2:
- case CONSTR_STATIC:
- case CONSTR_NOCAF_STATIC:
+ case CONSTR_NOCAF:
{
// check that the size is in range
ASSERT(field < (StgWord32)(info->layout.payload.ptrs +