Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/ac6edfae76aac302c0190895d5203c584a3a2f4b >--------------------------------------------------------------- commit ac6edfae76aac302c0190895d5203c584a3a2f4b Author: Ian Lynagh <[email protected]> Date: Wed Jun 13 17:36:47 2012 +0100 Remove more redundant Platform arguments >--------------------------------------------------------------- compiler/cmm/PprCmmDecl.hs | 16 +++++++--------- compiler/codeGen/CodeGen.lhs | 2 +- compiler/main/HscMain.hs | 3 +-- 3 files changed, 9 insertions(+), 12 deletions(-) diff --git a/compiler/cmm/PprCmmDecl.hs b/compiler/cmm/PprCmmDecl.hs index 80c5b81..41653dc 100644 --- a/compiler/cmm/PprCmmDecl.hs +++ b/compiler/cmm/PprCmmDecl.hs @@ -62,15 +62,14 @@ import SMRep pprCmms :: (Outputable info, Outputable g) - => Platform -> [GenCmmGroup CmmStatics info g] -> SDoc -pprCmms _ cmms = pprCode CStyle (vcat (intersperse separator $ map ppr cmms)) + => [GenCmmGroup CmmStatics info g] -> SDoc +pprCmms cmms = pprCode CStyle (vcat (intersperse separator $ map ppr cmms)) where separator = space $$ ptext (sLit "-------------------") $$ space writeCmms :: (Outputable info, Outputable g) => DynFlags -> Handle -> [GenCmmGroup CmmStatics info g] -> IO () -writeCmms dflags handle cmms = printForC dflags handle (pprCmms platform cmms) - where platform = targetPlatform dflags +writeCmms dflags handle cmms = printForC dflags handle (pprCmms cmms) ----------------------------------------------------------------------------- @@ -85,7 +84,7 @@ instance Outputable CmmStatic where ppr x = sdocWithPlatform $ \platform -> pprStatic platform x instance Outputable CmmInfoTable where - ppr x = sdocWithPlatform $ \platform -> pprInfoTable platform x + ppr = pprInfoTable ----------------------------------------------------------------------------- @@ -120,11 +119,10 @@ pprTop _ (CmmData section ds) = -- -------------------------------------------------------------------------- -- Info tables. -pprInfoTable :: Platform -> CmmInfoTable -> SDoc -pprInfoTable _ CmmNonInfoTable +pprInfoTable :: CmmInfoTable -> SDoc +pprInfoTable CmmNonInfoTable = empty -pprInfoTable _ - (CmmInfoTable { cit_lbl = lbl, cit_rep = rep +pprInfoTable (CmmInfoTable { cit_lbl = lbl, cit_rep = rep , cit_prof = prof_info , cit_srt = _srt }) = vcat [ ptext (sLit "label:") <+> ppr lbl diff --git a/compiler/codeGen/CodeGen.lhs b/compiler/codeGen/CodeGen.lhs index 24ac064..ce12d43 100644 --- a/compiler/codeGen/CodeGen.lhs +++ b/compiler/codeGen/CodeGen.lhs @@ -77,7 +77,7 @@ codeGen dflags this_mod data_tycons cost_centre_info stg_binds hpc_info = do -- initialisation routines; see Note -- [pipeline-split-init]. - dumpIfSet_dyn dflags Opt_D_dump_cmm "Cmm" (pprCmms (targetPlatform dflags) code_stuff) + dumpIfSet_dyn dflags Opt_D_dump_cmm "Cmm" (pprCmms code_stuff) return code_stuff mkModuleInit diff --git a/compiler/main/HscMain.hs b/compiler/main/HscMain.hs index ecfef91..df85d06 100644 --- a/compiler/main/HscMain.hs +++ b/compiler/main/HscMain.hs @@ -1355,11 +1355,10 @@ tryNewCodeGen :: HscEnv -> Module -> [TyCon] tryNewCodeGen hsc_env this_mod data_tycons cost_centre_info stg_binds hpc_info = do let dflags = hsc_dflags hsc_env - platform = targetPlatform dflags prog <- StgCmm.codeGen dflags this_mod data_tycons cost_centre_info stg_binds hpc_info dumpIfSet_dyn dflags Opt_D_dump_cmmz "Cmm produced by new codegen" - (pprCmms platform prog) + (pprCmms prog) -- We are building a single SRT for the entire module, so -- we must thread it through all the procedures as we cps-convert them. _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
