diff options
author | Simon Marlow <marlowsd@gmail.com> | 2016-11-09 09:20:02 +0000 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2016-11-14 14:43:35 +0000 |
commit | 55d535da10dd63bbaf03fb176ced7179087cd0d4 (patch) | |
tree | 57bdbf04381fe08d90c384f5b10e77c3384227d9 /compiler/cmm/CLabel.hs | |
parent | 6c0f10fac767c49b65ed71e8eb8e78ca4f9062d5 (diff) | |
download | haskell-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 'compiler/cmm/CLabel.hs')
-rw-r--r-- | compiler/cmm/CLabel.hs | 19 |
1 files changed, 0 insertions, 19 deletions
diff --git a/compiler/cmm/CLabel.hs b/compiler/cmm/CLabel.hs index b262371b65..0b64e3e1ff 100644 --- a/compiler/cmm/CLabel.hs +++ b/compiler/cmm/CLabel.hs @@ -20,10 +20,8 @@ module CLabel ( mkEntryLabel, mkSlowEntryLabel, mkConEntryLabel, - mkStaticConEntryLabel, mkRednCountsLabel, mkConInfoTableLabel, - mkStaticInfoTableLabel, mkLargeSRTLabel, mkApEntryLabel, mkApInfoTableLabel, @@ -33,9 +31,7 @@ module CLabel ( mkLocalInfoTableLabel, mkLocalEntryLabel, mkLocalConEntryLabel, - mkLocalStaticConEntryLabel, mkLocalConInfoTableLabel, - mkLocalStaticInfoTableLabel, mkLocalClosureTableLabel, mkReturnPtLabel, @@ -390,8 +386,6 @@ data IdLabelInfo | ConEntry -- ^ Constructor entry point | ConInfoTable -- ^ Corresponding info table - | StaticConEntry -- ^ Static constructor entry point - | StaticInfoTable -- ^ Corresponding info table | ClosureTable -- ^ Table of closures for Enum tycons @@ -479,25 +473,17 @@ mkEntryLabel :: Name -> CafInfo -> CLabel mkClosureTableLabel :: Name -> CafInfo -> CLabel mkLocalConInfoTableLabel :: CafInfo -> Name -> CLabel mkLocalConEntryLabel :: CafInfo -> Name -> CLabel -mkLocalStaticInfoTableLabel :: CafInfo -> Name -> CLabel -mkLocalStaticConEntryLabel :: CafInfo -> Name -> CLabel mkConInfoTableLabel :: Name -> CafInfo -> CLabel -mkStaticInfoTableLabel :: Name -> CafInfo -> CLabel mkClosureLabel name c = IdLabel name c Closure mkInfoTableLabel name c = IdLabel name c InfoTable mkEntryLabel name c = IdLabel name c Entry mkClosureTableLabel name c = IdLabel name c ClosureTable mkLocalConInfoTableLabel c con = IdLabel con c ConInfoTable mkLocalConEntryLabel c con = IdLabel con c ConEntry -mkLocalStaticInfoTableLabel c con = IdLabel con c StaticInfoTable -mkLocalStaticConEntryLabel c con = IdLabel con c StaticConEntry mkConInfoTableLabel name c = IdLabel name c ConInfoTable -mkStaticInfoTableLabel name c = IdLabel name c StaticInfoTable mkConEntryLabel :: Name -> CafInfo -> CLabel -mkStaticConEntryLabel :: Name -> CafInfo -> CLabel mkConEntryLabel name c = IdLabel name c ConEntry -mkStaticConEntryLabel name c = IdLabel name c StaticConEntry -- Constructing Cmm Labels mkDirty_MUT_VAR_Label, mkSplitMarkerLabel, mkUpdInfoLabel, @@ -677,7 +663,6 @@ toSlowEntryLbl l = pprPanic "toSlowEntryLbl" (ppr l) toEntryLbl :: CLabel -> CLabel toEntryLbl (IdLabel n c LocalInfoTable) = IdLabel n c LocalEntry toEntryLbl (IdLabel n c ConInfoTable) = IdLabel n c ConEntry -toEntryLbl (IdLabel n c StaticInfoTable) = IdLabel n c StaticConEntry toEntryLbl (IdLabel n c _) = IdLabel n c Entry toEntryLbl (CaseLabel n CaseReturnInfo) = CaseLabel n CaseReturnPt toEntryLbl (CmmLabel m str CmmInfo) = CmmLabel m str CmmEntry @@ -688,7 +673,6 @@ toInfoLbl :: CLabel -> CLabel toInfoLbl (IdLabel n c Entry) = IdLabel n c InfoTable toInfoLbl (IdLabel n c LocalEntry) = IdLabel n c LocalInfoTable toInfoLbl (IdLabel n c ConEntry) = IdLabel n c ConInfoTable -toInfoLbl (IdLabel n c StaticConEntry) = IdLabel n c StaticInfoTable toInfoLbl (IdLabel n c _) = IdLabel n c InfoTable toInfoLbl (CaseLabel n CaseReturnPt) = CaseLabel n CaseReturnInfo toInfoLbl (CmmLabel m str CmmEntry) = CmmLabel m str CmmInfo @@ -944,7 +928,6 @@ idInfoLabelType info = LocalInfoTable -> DataLabel Closure -> GcPtrLabel ConInfoTable -> DataLabel - StaticInfoTable -> DataLabel ClosureTable -> DataLabel RednCounts -> DataLabel _ -> CodeLabel @@ -1239,8 +1222,6 @@ ppIdFlavor x = pp_cSEP <> RednCounts -> text "ct" ConEntry -> text "con_entry" ConInfoTable -> text "con_info" - StaticConEntry -> text "static_entry" - StaticInfoTable -> text "static_info" ClosureTable -> text "closure_tbl" ) |