summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-09-18 15:32:36 +0100
committerIan Lynagh <ian@well-typed.com>2012-09-18 15:32:36 +0100
commit98903b9626ab332eeac9d4baeb6854dd47272e8c (patch)
tree9dfe2966119ba15da0f3747592e99c4f4545ba59
parent9615222985f40b62410e1ccc7b6e8581c2729150 (diff)
downloadhaskell-98903b9626ab332eeac9d4baeb6854dd47272e8c.tar.gz
Give packHalfWordsCLit a more specific type
I'm not sure if there's a reason why the HeapRep constructor takes 2 WordOffs rather than 2 StgHalfWords.
-rw-r--r--compiler/cmm/CmmInfo.hs2
-rw-r--r--compiler/cmm/CmmUtils.hs2
2 files changed, 2 insertions, 2 deletions
diff --git a/compiler/cmm/CmmInfo.hs b/compiler/cmm/CmmInfo.hs
index 0735937754..a93d1155ce 100644
--- a/compiler/cmm/CmmInfo.hs
+++ b/compiler/cmm/CmmInfo.hs
@@ -183,7 +183,7 @@ mkInfoTableContents dflags
; return (prof_data ++ liveness_data, (std_info, srt_label)) }
| HeapRep _ ptrs nonptrs closure_type <- smrep
- = do { let layout = packHalfWordsCLit dflags ptrs nonptrs
+ = do { let layout = packHalfWordsCLit dflags (fromIntegral ptrs) (fromIntegral nonptrs)
; (prof_lits, prof_data) <- mkProfLits dflags prof
; let (srt_label, srt_bitmap) = mkSRTLit dflags srt
; (mb_srt_field, mb_layout, extra_bits, ct_data)
diff --git a/compiler/cmm/CmmUtils.hs b/compiler/cmm/CmmUtils.hs
index bff4804fc2..e4d1c9efb5 100644
--- a/compiler/cmm/CmmUtils.hs
+++ b/compiler/cmm/CmmUtils.hs
@@ -158,7 +158,7 @@ mkRODataLits lbl lits
mkWordCLit :: DynFlags -> StgWord -> CmmLit
mkWordCLit dflags wd = CmmInt (fromIntegral wd) (wordWidth dflags)
-packHalfWordsCLit :: (Integral a, Integral b) => DynFlags -> a -> b -> CmmLit
+packHalfWordsCLit :: DynFlags -> StgHalfWord -> StgHalfWord -> CmmLit
-- Make a single word literal in which the lower_half_word is
-- at the lower address, and the upper_half_word is at the
-- higher address