diff options
author | Simon Peyton Jones <simonpj@microsoft.com> | 2014-03-11 13:09:21 +0000 |
---|---|---|
committer | Simon Peyton Jones <simonpj@microsoft.com> | 2014-03-13 08:36:59 +0000 |
commit | b0416e776d2959ac8b9903eb9301b7b967c53a8e (patch) | |
tree | 7cff07cd7261f4256cf3861a3efd5d9365fed21e /compiler/codeGen/StgCmmLayout.hs | |
parent | 7f919dec1579641bbcd02978a0038c8a3723d8b7 (diff) | |
download | haskell-b0416e776d2959ac8b9903eb9301b7b967c53a8e.tar.gz |
Comments on virtHp, realHp (Trac #8864)
Documentation in response to Johan's questions
Plus, don't export hpRel from StgCmmHeap, StgCmmLayout
(it is only used locally in StgCmmLayout)
Diffstat (limited to 'compiler/codeGen/StgCmmLayout.hs')
-rw-r--r-- | compiler/codeGen/StgCmmLayout.hs | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/compiler/codeGen/StgCmmLayout.hs b/compiler/codeGen/StgCmmLayout.hs index 7fbcbced81..59afc897dc 100644 --- a/compiler/codeGen/StgCmmLayout.hs +++ b/compiler/codeGen/StgCmmLayout.hs @@ -15,7 +15,7 @@ module StgCmmLayout ( slowCall, directCall, - mkVirtHeapOffsets, mkVirtConstrOffsets, getHpRelOffset, hpRel, + mkVirtHeapOffsets, mkVirtConstrOffsets, getHpRelOffset, ArgRep(..), toArgRep, argRepSizeW -- re-exported from StgCmmArgRep ) where @@ -366,13 +366,14 @@ slowArgs dflags args -- careful: reps contains voids (V), but args does not ---- Laying out objects on the heap and stack ------------------------------------------------------------------------- --- The heap always grows upwards, so hpRel is easy +-- The heap always grows upwards, so hpRel is easy to compute hpRel :: VirtualHpOffset -- virtual offset of Hp -> VirtualHpOffset -- virtual offset of The Thing -> WordOff -- integer word offset hpRel hp off = off - hp getHpRelOffset :: VirtualHpOffset -> FCode CmmExpr +-- See Note [Virtual and real heap pointers] in StgCmmMonad getHpRelOffset virtual_offset = do dflags <- getDynFlags hp_usg <- getHpUsage |