[commit: ghc] wip/T14626: WIP: require tagged only when algebraic (485082c)

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


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

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

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

commit 485082cd256e6124d1fb269992ae674bf54a6142
Author: Gabor Greif <ggreif at gmail.com>
Date:   Sat Jan 13 14:10:24 2018 +0100

    WIP: require tagged only when algebraic


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

485082cd256e6124d1fb269992ae674bf54a6142
 compiler/codeGen/StgCmmCon.hs | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/compiler/codeGen/StgCmmCon.hs b/compiler/codeGen/StgCmmCon.hs
index d9832c7..fe85f05 100644
--- a/compiler/codeGen/StgCmmCon.hs
+++ b/compiler/codeGen/StgCmmCon.hs
@@ -30,6 +30,7 @@ import StgCmmUtils
 import StgCmmClosure
 import StgCmmProf ( curCCS )
 
+import TyCon
 import CmmExpr
 import CLabel
 import MkGraph
@@ -244,7 +245,8 @@ buildDynCon' dflags _ binder actually_bound ccs con args
 
           ; hp_plus_n <- allocDynClosure ticky_name info_tbl lf_info
                                           use_cc blame_cc args_w_offsets
-          ; mapM_ (checkTagOnPtr hp_plus_n) (take ptr_wds $ zip args_w_offsets $ dataConImplBangs con)
+          ; when (isDataTyCon $ dataConTyCon con)
+            $ mapM_ (checkTagOnPtr hp_plus_n) (take ptr_wds $ zip args_w_offsets $ dataConImplBangs con)
           ; return (mkRhsInit dflags reg lf_info hp_plus_n) }
     where
       use_cc      -- cost-centre to stick in the object



More information about the ghc-commits mailing list