[commit: ghc] wip/T14626: WIP: "ds" is the suspect (151a0d7)

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


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

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

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

commit 151a0d739ae03987234d11a474a756094785e8e6
Author: Gabor Greif <ggreif at gmail.com>
Date:   Thu Jan 4 14:17:02 2018 +0100

    WIP: "ds" is the suspect
    
    let's see what happens for /= "ds"...


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

151a0d739ae03987234d11a474a756094785e8e6
 compiler/codeGen/StgCmmClosure.hs | 15 +++++++++++++--
 1 file changed, 13 insertions(+), 2 deletions(-)

diff --git a/compiler/codeGen/StgCmmClosure.hs b/compiler/codeGen/StgCmmClosure.hs
index f655afd..dfa98ca 100644
--- a/compiler/codeGen/StgCmmClosure.hs
+++ b/compiler/codeGen/StgCmmClosure.hs
@@ -632,13 +632,24 @@ 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
   -- , (\case OtherCon _ -> False; _ -> True) $ idUnfolding id
   , OtherCon _ <- idUnfolding id
-  -- , take 4 (occNameString (nameOccName name)) == "wild" || pprTrace "getCallMethod#####" (ppr id $$ ppr (idUnfolding id)) True
+  , let str = occNameString (nameOccName name)
+  , take 4 str == "wild" || take 2 str == "ds" || pprTrace "getCallMethod#####" (ppr id $$ ppr (idUnfolding id)) True
+  , take 4 str == "wild" || take 2 str == "ds"
   = {-pprTrace "getCallMethod" (ppr id)-} ReturnIt -- seems to come from case, must be (tagged) WHNF already
+
+
+
+
+{-
+  , head str /= '$'
+  -- , ('w':'i':'l':'d':_) <- occNameString (nameOccName name) -- FIXME: remove later
+  , take 4 str == "wild" || pprTrace "getCallMethod#####" (ppr id $$ text str $$ ppr (idUnfolding id)) True
+-}
 {-
 getCallMethod _ name _ (LFUnknown False) 0 _v_args _cg_loc _self_loop_info
   | occNameString (nameOccName name) == "wild" -- TODO: make this robust



More information about the ghc-commits mailing list