summaryrefslogtreecommitdiff
path: root/compiler/codeGen
diff options
context:
space:
mode:
authorDavid Terei <davidterei@gmail.com>2011-12-11 12:15:39 -0800
committerDavid Terei <davidterei@gmail.com>2011-12-11 12:15:39 -0800
commit3eb443b6b92687d738be0253663860acf0928aa3 (patch)
tree9d7ac620e96231fca44566c88cfb6800530b9274 /compiler/codeGen
parent5239074b699f16fa206d362f8f5c225abb81c81c (diff)
downloadhaskell-3eb443b6b92687d738be0253663860acf0928aa3.tar.gz
Fix comment in CgMonad
Diffstat (limited to 'compiler/codeGen')
-rw-r--r--compiler/codeGen/CgMonad.lhs11
1 files changed, 5 insertions, 6 deletions
diff --git a/compiler/codeGen/CgMonad.lhs b/compiler/codeGen/CgMonad.lhs
index 996ac35a67..302d8ac652 100644
--- a/compiler/codeGen/CgMonad.lhs
+++ b/compiler/codeGen/CgMonad.lhs
@@ -299,12 +299,11 @@ data HeapUsage =
}
\end{code}
-The heap high water mark is the larger of virtHp and hwHp. The latter is
-only records the high water marks of forked-off branches, so to find the
-heap high water mark you have to take the max of virtHp and hwHp. Remember,
-virtHp never retreats!
-
-Note Jan 04: ok, so why do we only look at the virtual Hp??
+virtHp keeps track of the next location to allocate an object at. realHp keeps
+track of what the Hp STG register actually points to. The reason these aren't
+always the same is that we want to be able to move the realHp in one go when
+allocating numerous objects to save having to bump it each time. virtHp we do
+bump each time but it doesn't create corresponding inefficient machine code.
\begin{code}
heapHWM :: HeapUsage -> VirtualHpOffset