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

git at git.haskell.org git at git.haskell.org
Sat Jan 13 13:11:02 UTC 2018


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

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

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

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

    WIP: require tagged only when algebraic


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

45fcc6c3623c01ed29b1aa0838527943a329f05b
 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