diff options
author | Simon Marlow <marlowsd@gmail.com> | 2011-08-22 13:56:17 +0100 |
---|---|---|
committer | Simon Marlow <marlowsd@gmail.com> | 2011-08-25 11:12:30 +0100 |
commit | 5b167f5edad7d3268de20452da7af05c38972f7c (patch) | |
tree | 36a14e64b510ede91e4e334f3e44d865321adcde /compiler/nativeGen | |
parent | 3108accd634a521b25471df19f063c2061d6d3ee (diff) | |
download | haskell-5b167f5edad7d3268de20452da7af05c38972f7c.tar.gz |
Snapshot of codegen refactoring to share with simonpj
Diffstat (limited to 'compiler/nativeGen')
-rw-r--r-- | compiler/nativeGen/AsmCodeGen.lhs | 8 | ||||
-rw-r--r-- | compiler/nativeGen/Instruction.hs | 2 |
2 files changed, 5 insertions, 5 deletions
diff --git a/compiler/nativeGen/AsmCodeGen.lhs b/compiler/nativeGen/AsmCodeGen.lhs index 350f533d85..aabe39af85 100644 --- a/compiler/nativeGen/AsmCodeGen.lhs +++ b/compiler/nativeGen/AsmCodeGen.lhs @@ -148,7 +148,7 @@ data NcgImpl statics instr jumpDest = NcgImpl { } -------------------- -nativeCodeGen :: DynFlags -> Handle -> UniqSupply -> [RawCmm] -> IO () +nativeCodeGen :: DynFlags -> Handle -> UniqSupply -> [RawCmmPgm] -> IO () nativeCodeGen dflags h us cmms = let nCG' :: (Outputable statics, PlatformOutputable instr, Instruction instr) => NcgImpl statics instr jumpDest -> IO () nCG' ncgImpl = nativeCodeGen' dflags ncgImpl h us cmms @@ -209,7 +209,7 @@ nativeCodeGen dflags h us cmms nativeCodeGen' :: (Outputable statics, PlatformOutputable instr, Instruction instr) => DynFlags -> NcgImpl statics instr jumpDest - -> Handle -> UniqSupply -> [RawCmm] -> IO () + -> Handle -> UniqSupply -> [RawCmmPgm] -> IO () nativeCodeGen' dflags ncgImpl h us cmms = do let platform = targetPlatform dflags @@ -264,7 +264,7 @@ nativeCodeGen' dflags ncgImpl h us cmms return () - where add_split (Cmm tops) + where add_split tops | dopt Opt_SplitObjs dflags = split_marker : tops | otherwise = tops @@ -356,7 +356,7 @@ cmmNativeGen dflags ncgImpl us cmm count dumpIfSet_dyn dflags Opt_D_dump_opt_cmm "Optimised Cmm" - (pprCmm platform $ Cmm [opt_cmm]) + (pprCmmPgm platform [opt_cmm]) -- generate native code from cmm let ((native, lastMinuteImports), usGen) = diff --git a/compiler/nativeGen/Instruction.hs b/compiler/nativeGen/Instruction.hs index b2db2ef206..31827b9088 100644 --- a/compiler/nativeGen/Instruction.hs +++ b/compiler/nativeGen/Instruction.hs @@ -37,7 +37,7 @@ noUsage = RU [] [] -- Our flavours of the Cmm types -- Type synonyms for Cmm populated with native code type NatCmm instr - = GenCmm + = GenCmmPgm CmmStatics (Maybe CmmStatics) (ListGraph instr) |