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

git at git.haskell.org git at git.haskell.org
Wed Jan 3 23:56:20 UTC 2018


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

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

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

commit 04263e0580d39a2c138489b40da20ec6866ab7b2
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


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

04263e0580d39a2c138489b40da20ec6866ab7b2
 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 720d9a9..089e3a4 100644
--- a/compiler/codeGen/StgCmmClosure.hs
+++ b/compiler/codeGen/StgCmmClosure.hs
@@ -1,4 +1,4 @@
-{-# LANGUAGE CPP, RecordWildCards #-}
+{-# LANGUAGE CPP, RecordWildCards, LambdaCase #-}
 
 -----------------------------------------------------------------------------
 --
@@ -69,7 +69,7 @@ module StgCmmClosure (
 import GhcPrelude
 
 import StgSyn
-import CoreSyn (isEvaldUnfolding)
+import CoreSyn (isEvaldUnfolding, Unfolding(..))
 import SMRep
 import Cmm
 import PprCmmExpr()
@@ -626,10 +626,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