diff options
author | Simon Marlow <marlowsd@gmail.com> | 2013-11-29 10:32:26 +0000 |
---|---|---|
committer | Johan Tibell <johan.tibell@gmail.com> | 2014-03-11 20:01:54 +0100 |
commit | a70e7b4762c75812254f7781bcd48139c4ec40dd (patch) | |
tree | 0a1641c4edf3b78277f86cee225333d211b1f4af /compiler/codeGen/StgCmmHeap.hs | |
parent | 22f010e08e58ba40b0ab59ec7a7c02cce0938cce (diff) | |
download | haskell-a70e7b4762c75812254f7781bcd48139c4ec40dd.tar.gz |
Represent offsets into heap objects with byte, not word, offsets
I'd like to be able to pack together non-pointer fields that are less
than a word in size, and this is a necessary prerequisite.
Diffstat (limited to 'compiler/codeGen/StgCmmHeap.hs')
-rw-r--r-- | compiler/codeGen/StgCmmHeap.hs | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/compiler/codeGen/StgCmmHeap.hs b/compiler/codeGen/StgCmmHeap.hs index 077b7809b5..75ad8b40f4 100644 --- a/compiler/codeGen/StgCmmHeap.hs +++ b/compiler/codeGen/StgCmmHeap.hs @@ -14,7 +14,6 @@ module StgCmmHeap ( heapStackCheckGen, entryHeapCheck', - mkVirtHeapOffsets, mkVirtConstrOffsets, mkStaticClosureFields, mkStaticClosure, allocDynClosure, allocDynClosureCmm, @@ -68,7 +67,7 @@ allocDynClosure allocDynClosureCmm :: Maybe Id -> CmmInfoTable -> LambdaFormInfo -> CmmExpr -> CmmExpr - -> [(CmmExpr, VirtualHpOffset)] + -> [(CmmExpr, ByteOff)] -> FCode CmmExpr -- returns Hp+n -- allocDynClosure allocates the thing in the heap, @@ -130,18 +129,18 @@ allocDynClosureCmm mb_id info_tbl lf_info use_cc _blame_cc amodes_w_offsets emitSetDynHdr :: CmmExpr -> CmmExpr -> CmmExpr -> FCode () emitSetDynHdr base info_ptr ccs = do dflags <- getDynFlags - hpStore base (header dflags) [0..] + hpStore base (header dflags) [0, wORD_SIZE dflags ..] where header :: DynFlags -> [CmmExpr] header dflags = [info_ptr] ++ dynProfHdr dflags ccs -- ToDof: Parallel stuff -- No ticky header -hpStore :: CmmExpr -> [CmmExpr] -> [VirtualHpOffset] -> FCode () +hpStore :: CmmExpr -> [CmmExpr] -> [ByteOff] -> FCode () -- Store the item (expr,off) in base[off] hpStore base vals offs = do dflags <- getDynFlags - let mk_store val off = mkStore (cmmOffsetW dflags base off) val + let mk_store val off = mkStore (cmmOffsetB dflags base off) val emit (catAGraphs (zipWith mk_store vals offs)) |