[commit: ghc] wip/T14626: WIP: exclude top-level values for now (b1f1c92)

git at git.haskell.org git at git.haskell.org
Sun Jan 28 16:06:28 UTC 2018


Repository : ssh://git@git.haskell.org/ghc

On branch  : wip/T14626
Link       : http://ghc.haskell.org/trac/ghc/changeset/b1f1c920474de31e7d94496d600a3f4694f969bd/ghc

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

commit b1f1c920474de31e7d94496d600a3f4694f969bd
Author: Gabor Greif <ggreif at gmail.com>
Date:   Thu Jan 4 00:56:00 2018 +0100

    WIP: exclude top-level values for now
    
    as they probably won't get tagged correctly this way


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

b1f1c920474de31e7d94496d600a3f4694f969bd
 compiler/codeGen/StgCmmClosure.hs | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/compiler/codeGen/StgCmmClosure.hs b/compiler/codeGen/StgCmmClosure.hs
index 1d6c654..f655afd 100644
--- a/compiler/codeGen/StgCmmClosure.hs
+++ b/compiler/codeGen/StgCmmClosure.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE CPP, RecordWildCards #-}
+{-# LANGUAGE CPP, RecordWildCards, LambdaCase #-}
 
 -----------------------------------------------------------------------------
 --
@@ -71,7 +71,7 @@ import GhcPrelude
 import CoreSyn( isValueUnfolding, maybeUnfoldingTemplate, Expr(Cast) )
 import CoreOpt( exprIsSatConApp_maybe )
 import StgSyn
-import CoreSyn (isEvaldUnfolding)
+import CoreSyn (isEvaldUnfolding, Unfolding(..))
 import SMRep
 import Cmm
 import PprCmmExpr()
@@ -632,10 +632,12 @@ getCallMethod dflags name id (LFThunk _ _ updatable std_form_info is_fun)
 getCallMethod _ _name _ (LFUnknown True) _n_arg _v_args _cg_locs _self_loop_info
   = SlowCall -- might be a function
 
-getCallMethod _ name id (LFUnknown False) 0 _v_args _cg_loc _self_loop_info
+getCallMethod _ _name id (LFUnknown False) 0 _v_args _cg_loc _self_loop_info
   | isEvaldUnfolding (idUnfolding id)
   -- , ('w':'i':'l':'d':_) <- occNameString (nameOccName name) -- FIXME: remove later
-  , take 4 (occNameString (nameOccName name)) == "wild" || pprTrace "getCallMethod#####" (ppr id $$ ppr (idUnfolding id)) True
+  -- , (\case OtherCon _ -> False; _ -> True) $ idUnfolding id
+  , OtherCon _ <- idUnfolding id
+  -- , take 4 (occNameString (nameOccName name)) == "wild" || pprTrace "getCallMethod#####" (ppr id $$ ppr (idUnfolding id)) True
   = {-pprTrace "getCallMethod" (ppr id)-} ReturnIt -- seems to come from case, must be (tagged) WHNF already
 {-
 getCallMethod _ name _ (LFUnknown False) 0 _v_args _cg_loc _self_loop_info



More information about the ghc-commits mailing list