diff options
| author | Simon Peyton Jones <simonpj@microsoft.com> | 2012-09-17 08:09:36 +0100 |
|---|---|---|
| committer | Simon Peyton Jones <simonpj@microsoft.com> | 2012-09-17 08:09:36 +0100 |
| commit | 8c3b9aca3aaf946a91c9af6c07fc9d2afb6bbb76 (patch) | |
| tree | 4cad3f73dbb84bbda3b0b7141c5bde2afd359664 /compiler/codeGen/CgUtils.hs | |
| parent | 7b8a17ad3c0792f06ffa991e9e587f5458610a3c (diff) | |
| parent | b0f4c44ed777af599daf35035b0830b35e57fa4a (diff) | |
| download | haskell-8c3b9aca3aaf946a91c9af6c07fc9d2afb6bbb76.tar.gz | |
Merge branch 'master' of http://darcs.haskell.org/ghc
Diffstat (limited to 'compiler/codeGen/CgUtils.hs')
| -rw-r--r-- | compiler/codeGen/CgUtils.hs | 17 |
1 files changed, 8 insertions, 9 deletions
diff --git a/compiler/codeGen/CgUtils.hs b/compiler/codeGen/CgUtils.hs index 228c5bd2c6..c52c8a8c99 100644 --- a/compiler/codeGen/CgUtils.hs +++ b/compiler/codeGen/CgUtils.hs @@ -53,7 +53,6 @@ import TyCon import DataCon import Id import IdInfo -import Constants import SMRep import OldCmm import OldCmmUtils @@ -142,20 +141,20 @@ mkLtOp dflags lit = MO_U_Lt (typeWidth (cmmLitType dflags (mkSimpleLi Big families only use the tag value 1 to represent evaluatedness. -} -isSmallFamily :: Int -> Bool -isSmallFamily fam_size = fam_size <= mAX_PTR_TAG +isSmallFamily :: DynFlags -> Int -> Bool +isSmallFamily dflags fam_size = fam_size <= mAX_PTR_TAG dflags -tagForCon :: DataCon -> ConTagZ -tagForCon con = tag +tagForCon :: DynFlags -> DataCon -> ConTagZ +tagForCon dflags con = tag where con_tag = dataConTagZ con fam_size = tyConFamilySize (dataConTyCon con) - tag | isSmallFamily fam_size = con_tag + 1 - | otherwise = 1 + tag | isSmallFamily dflags fam_size = con_tag + 1 + | otherwise = 1 --Tag an expression, to do: refactor, this appears in some other module. tagCons :: DynFlags -> DataCon -> CmmExpr -> CmmExpr -tagCons dflags con expr = cmmOffsetB dflags expr (tagForCon con) +tagCons dflags con expr = cmmOffsetB dflags expr (tagForCon dflags con) -------------------------------------------------------------------------- -- @@ -800,7 +799,7 @@ getSRTInfo = do -> do id <- newUnique let srt_desc_lbl = mkLargeSRTLabel id emitRODataLits "getSRTInfo" srt_desc_lbl - ( cmmLabelOffW srt_lbl off + ( cmmLabelOffW dflags srt_lbl off : mkWordCLit dflags (fromIntegral len) : map (mkWordCLit dflags) bmp) return (C_SRT srt_desc_lbl 0 srt_escape) |
