Commit 98903b96 authored by ian@well-typed.com's avatar ian@well-typed.com
Browse files

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.
parent 96152229
...@@ -183,7 +183,7 @@ mkInfoTableContents dflags ...@@ -183,7 +183,7 @@ mkInfoTableContents dflags
; return (prof_data ++ liveness_data, (std_info, srt_label)) } ; return (prof_data ++ liveness_data, (std_info, srt_label)) }
| HeapRep _ ptrs nonptrs closure_type <- smrep | 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 ; (prof_lits, prof_data) <- mkProfLits dflags prof
; let (srt_label, srt_bitmap) = mkSRTLit dflags srt ; let (srt_label, srt_bitmap) = mkSRTLit dflags srt
; (mb_srt_field, mb_layout, extra_bits, ct_data) ; (mb_srt_field, mb_layout, extra_bits, ct_data)
......
...@@ -158,7 +158,7 @@ mkRODataLits lbl lits ...@@ -158,7 +158,7 @@ mkRODataLits lbl lits
mkWordCLit :: DynFlags -> StgWord -> CmmLit mkWordCLit :: DynFlags -> StgWord -> CmmLit
mkWordCLit dflags wd = CmmInt (fromIntegral wd) (wordWidth dflags) 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 -- Make a single word literal in which the lower_half_word is
-- at the lower address, and the upper_half_word is at the -- at the lower address, and the upper_half_word is at the
-- higher address -- higher address
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment