Repository : ssh://darcs.haskell.org//srv/darcs/ghc On branch : master
http://hackage.haskell.org/trac/ghc/changeset/6dd55e8a056bb6a4281fc6d730df6ba54505a6e2 >--------------------------------------------------------------- commit 6dd55e8a056bb6a4281fc6d730df6ba54505a6e2 Author: Simon Marlow <[email protected]> Date: Wed Aug 29 12:48:40 2012 +0100 Fix a bug in foldExpDeep This caused the CAF analysis to occasionally miss a CAF sometimes, resulting in a very hard to diagnose crash. >--------------------------------------------------------------- compiler/cmm/CmmNode.hs | 9 +-------- 1 files changed, 1 insertions(+), 8 deletions(-) diff --git a/compiler/cmm/CmmNode.hs b/compiler/cmm/CmmNode.hs index fa41ed5..ae7ac09 100644 --- a/compiler/cmm/CmmNode.hs +++ b/compiler/cmm/CmmNode.hs @@ -395,14 +395,7 @@ foldExp f (CmmCall {cml_target=tgt}) z = f tgt z foldExp f (CmmForeignCall {tgt=tgt, args=args}) z = foldr f (foldExpForeignTarget f tgt z) args foldExpDeep :: (CmmExpr -> z -> z) -> CmmNode e x -> z -> z -foldExpDeep f = foldExp go - where -- go :: CmmExpr -> z -> z - go e@(CmmMachOp _ es) z = gos es $! f e z - go e@(CmmLoad addr _) z = go addr $! f e z - go e z = f e z - - gos [] z = z - gos (e:es) z = gos es $! f e z +foldExpDeep f = foldExp (wrapRecExpf f) -- ----------------------------------------------------------------------------- _______________________________________________ Cvs-ghc mailing list [email protected] http://www.haskell.org/mailman/listinfo/cvs-ghc
