[commit: ghc] wip/T13861: WIP: add an assert (751266d)

git at git.haskell.org git at git.haskell.org
Wed Jan 3 06:23:36 UTC 2018


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

On branch  : wip/T13861
Link       : http://ghc.haskell.org/trac/ghc/changeset/751266de5d593d7ec02ee05ce732a1605a420583/ghc

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

commit 751266de5d593d7ec02ee05ce732a1605a420583
Author: Gabor Greif <ggreif at gmail.com>
Date:   Wed Jan 3 07:21:36 2018 +0100

    WIP: add an assert
    
    that we don't enter an Id that already *is* evald


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

751266de5d593d7ec02ee05ce732a1605a420583
 compiler/codeGen/StgCmmExpr.hs | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/compiler/codeGen/StgCmmExpr.hs b/compiler/codeGen/StgCmmExpr.hs
index 663afdc..1de03e5 100644
--- a/compiler/codeGen/StgCmmExpr.hs
+++ b/compiler/codeGen/StgCmmExpr.hs
@@ -843,7 +843,8 @@ cgIdApp fun_id args = do
           -- ToDo: does ReturnIt guarantee tagged?
 
         EnterIt -> ASSERT( null args )  -- Discarding arguments
-                   emitEnter fun
+                   ASSERT2( not (isEvaldUnfolding (idUnfolding fun_id)), ppr fun_id <+> ppr (idUnfolding fun_id) $$ ppr cg_fun_id <+> ppr (idUnfolding cg_fun_id))
+                   if isEvaldUnfolding (idUnfolding fun_id) then pprPanic "cgIdApp" (ppr fun_id <+> ppr (idUnfolding fun_id) $$ ppr cg_fun_id <+> ppr (idUnfolding cg_fun_id)) else emitEnter fun
 
         SlowCall -> do      -- A slow function call via the RTS apply routines
                 { tickySlowCall lf_info args



More information about the ghc-commits mailing list