summaryrefslogtreecommitdiff
path: root/compiler/GHC/StgToCmm/Layout.hs
diff options
context:
space:
mode:
authorSylvain Henry <sylvain@haskus.fr>2020-03-31 12:38:56 +0200
committerSylvain Henry <sylvain@haskus.fr>2020-07-31 19:32:09 +0200
commit56a7c19337c5b2aa21d521a6d7c965174ec8379b (patch)
treed280483bcf3e2c34d1761b0dc9ec09b863026073 /compiler/GHC/StgToCmm/Layout.hs
parent380638a33691ba43fdcd2e18bca636750e5f66f1 (diff)
downloadhaskell-56a7c19337c5b2aa21d521a6d7c965174ec8379b.tar.gz
Refactor CLabel pretty-printing
Pretty-printing CLabel relies on sdocWithDynFlags that we want to remove (#10143, #17957). It uses it to query the backend and the platform. This patch exposes Clabel ppr functions specialised for each backend so that backend code can directly use them.
Diffstat (limited to 'compiler/GHC/StgToCmm/Layout.hs')
-rw-r--r--compiler/GHC/StgToCmm/Layout.hs10
1 files changed, 5 insertions, 5 deletions
diff --git a/compiler/GHC/StgToCmm/Layout.hs b/compiler/GHC/StgToCmm/Layout.hs
index 566e6666ad..9ba0b2cb6e 100644
--- a/compiler/GHC/StgToCmm/Layout.hs
+++ b/compiler/GHC/StgToCmm/Layout.hs
@@ -617,15 +617,15 @@ emitClosureProcAndInfoTable top_lvl bndr lf_info info_tbl args body
conv = if nodeMustPointToIt profile lf_info then NativeNodeCall
else NativeDirectCall
(offset, _, _) = mkCallEntry profile conv args' []
- ; emitClosureAndInfoTable info_tbl conv args' $ body (offset, node, arg_regs)
+ ; emitClosureAndInfoTable (profilePlatform profile) info_tbl conv args' $ body (offset, node, arg_regs)
}
-- Data constructors need closures, but not with all the argument handling
-- needed for functions. The shared part goes here.
-emitClosureAndInfoTable ::
- CmmInfoTable -> Convention -> [LocalReg] -> FCode () -> FCode ()
-emitClosureAndInfoTable info_tbl conv args body
+emitClosureAndInfoTable
+ :: Platform -> CmmInfoTable -> Convention -> [LocalReg] -> FCode () -> FCode ()
+emitClosureAndInfoTable platform info_tbl conv args body
= do { (_, blks) <- getCodeScoped body
- ; let entry_lbl = toEntryLbl (cit_lbl info_tbl)
+ ; let entry_lbl = toEntryLbl platform (cit_lbl info_tbl)
; emitProcWithConvention conv (Just info_tbl) entry_lbl args blks
}