Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/8246c7a4aff8ac763dafc6bdd63f647accafab06 >--------------------------------------------------------------- commit 8246c7a4aff8ac763dafc6bdd63f647accafab06 Author: Ian Lynagh <i...@well-typed.com> Date: Tue Dec 11 18:35:28 2012 +0000 Tweak how 'count' is handled in the nativeCodeGen We were always passing 0 to cmmNativeGenStream, so now the 0 is just hardcoded there. >--------------------------------------------------------------- compiler/nativeGen/AsmCodeGen.lhs | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/compiler/nativeGen/AsmCodeGen.lhs b/compiler/nativeGen/AsmCodeGen.lhs index ae5cd6f..e8781f3 100644 --- a/compiler/nativeGen/AsmCodeGen.lhs +++ b/compiler/nativeGen/AsmCodeGen.lhs @@ -257,7 +257,7 @@ nativeCodeGen' dflags ncgImpl h us cmms -- Pretty if it weren't for the fact that we do lots of little -- printDocs here (in order to do codegen in constant space). bufh <- newBufHandle h - ((imports, prof), us') <- cmmNativeGenStream dflags ncgImpl us split_cmms (bufh, ([], [])) 0 + ((imports, prof), us') <- cmmNativeGenStream dflags ncgImpl us split_cmms (bufh, ([], [])) bFlush bufh let (native, colorStats, linearStats) @@ -317,10 +317,9 @@ cmmNativeGenStream :: (Outputable statics, Outputable instr, Instruction instr) -> UniqSupply -> Stream IO RawCmmGroup () -> NativeGenState statics instr - -> Int -> IO (NativeGenAcc statics instr, UniqSupply) -cmmNativeGenStream dflags ncgImpl us cmm_stream ngs@(h, nga) count +cmmNativeGenStream dflags ncgImpl us cmm_stream ngs@(h, nga) = do r <- Stream.runStream cmm_stream case r of @@ -329,8 +328,8 @@ cmmNativeGenStream dflags ncgImpl us cmm_stream ngs@(h, nga) count (impAcc, profAcc) -> return ((reverse impAcc, reverse profAcc), us) Right (cmms, cmm_stream') -> do - (nga',us') <- cmmNativeGens dflags ncgImpl us cmms ngs count - cmmNativeGenStream dflags ncgImpl us' cmm_stream' (h, nga') count + (nga',us') <- cmmNativeGens dflags ncgImpl us cmms ngs 0 + cmmNativeGenStream dflags ncgImpl us' cmm_stream' (h, nga') -- | Do native code generation on all these cmms. -- _______________________________________________ Cvs-ghc mailing list Cvs-ghc@haskell.org http://www.haskell.org/mailman/listinfo/cvs-ghc