[commit: ghc] master: Don't duplicate decls unnecessarily in the environment (b49307f)

Ian Lynagh igloo at earth.li
Wed Apr 24 04:00:34 CEST 2013


Repository : http://darcs.haskell.org/ghc.git/

On branch  : master

https://github.com/ghc/ghc/commit/b49307f5b69a3ee9c7d1bcaf9d0dec3c9b3c2440

>---------------------------------------------------------------

commit b49307f5b69a3ee9c7d1bcaf9d0dec3c9b3c2440
Author: Ian Lynagh <ian at well-typed.com>
Date:   Mon Apr 22 19:48:06 2013 +0100

    Don't duplicate decls unnecessarily in the environment
    
    In loopDecls, as far as I can see the globalDecls will always
    already be in the environment, so don't add them again.

>---------------------------------------------------------------

 compiler/codeGen/StgCmmExtCode.hs | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/compiler/codeGen/StgCmmExtCode.hs b/compiler/codeGen/StgCmmExtCode.hs
index 941fef0..2c36442 100644
--- a/compiler/codeGen/StgCmmExtCode.hs
+++ b/compiler/codeGen/StgCmmExtCode.hs
@@ -94,7 +94,7 @@ instance HasDynFlags CmmParse where
 loopDecls :: CmmParse a -> CmmParse a
 loopDecls (EC fcode) =
       EC $ \e globalDecls -> do
-        (_, a) <- F.fixC (\ ~(decls, _) -> fcode (addListToUFM e (decls ++ globalDecls)) globalDecls)
+        (_, a) <- F.fixC (\ ~(decls, _) -> fcode (addListToUFM e decls) globalDecls)
         return (globalDecls, a)
 
 





More information about the ghc-commits mailing list