summaryrefslogtreecommitdiff
path: root/compiler/codeGen/StgCmmLayout.hs
diff options
context:
space:
mode:
authorIan Lynagh <igloo@earth.li>2012-06-13 12:13:00 +0100
committerIan Lynagh <igloo@earth.li>2012-06-13 12:13:00 +0100
commitd06edb8e93d6d19bbd898e2b2e26755598bb11f3 (patch)
tree88a6adbbd663f1a575c8b6a4d67f55ffd806ea2d /compiler/codeGen/StgCmmLayout.hs
parent2901e3ff1acaea9689d38e65b58080d515215414 (diff)
downloadhaskell-d06edb8e93d6d19bbd898e2b2e26755598bb11f3.tar.gz
Remove PlatformOutputable
We can now get the Platform from the DynFlags inside an SDoc, so we no longer need to pass the Platform in.
Diffstat (limited to 'compiler/codeGen/StgCmmLayout.hs')
-rw-r--r--compiler/codeGen/StgCmmLayout.hs9
1 files changed, 3 insertions, 6 deletions
diff --git a/compiler/codeGen/StgCmmLayout.hs b/compiler/codeGen/StgCmmLayout.hs
index c97c3d47cd..87e6d9f9dd 100644
--- a/compiler/codeGen/StgCmmLayout.hs
+++ b/compiler/codeGen/StgCmmLayout.hs
@@ -151,11 +151,9 @@ direct_call :: String -> CLabel -> RepArity -> [CmmExpr] -> [ArgRep] -> FCode ()
direct_call caller lbl arity args reps
| debugIsOn && arity > length reps -- Too few args
= do -- Caller should ensure that there enough args!
- dflags <- getDynFlags
- let platform = targetPlatform dflags
pprPanic "direct_call" (text caller <+> ppr arity
- <+> pprPlatform platform lbl <+> ppr (length reps)
- <+> pprPlatform platform args <+> ppr reps )
+ <+> ppr lbl <+> ppr (length reps)
+ <+> ppr args <+> ppr reps )
| null rest_reps -- Precisely the right number of arguments
= emitCall (NativeDirectCall, NativeReturn) target args
@@ -177,9 +175,8 @@ direct_call caller lbl arity args reps
slow_call :: CmmExpr -> [CmmExpr] -> [ArgRep] -> FCode ()
slow_call fun args reps
= do dflags <- getDynFlags
- let platform = targetPlatform dflags
call <- getCode $ direct_call "slow_call" (mkRtsApFastLabel rts_fun) arity args reps
- emit $ mkComment $ mkFastString ("slow_call for " ++ showSDoc dflags (pprPlatform platform fun) ++
+ emit $ mkComment $ mkFastString ("slow_call for " ++ showSDoc dflags (ppr fun) ++
" with pat " ++ unpackFS rts_fun)
emit (mkAssign nodeReg fun <*> call)
where