projects
/
ghc-hetmet.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
remove empty dir
[ghc-hetmet.git]
/
ghc
/
compiler
/
codeGen
/
SMRep.lhs
diff --git
a/ghc/compiler/codeGen/SMRep.lhs
b/ghc/compiler/codeGen/SMRep.lhs
index
1ffbcda
..
c807703
100644
(file)
--- a/
ghc/compiler/codeGen/SMRep.lhs
+++ b/
ghc/compiler/codeGen/SMRep.lhs
@@
-28,7
+28,7
@@
module SMRep (
SMRep(..), ClosureType(..),
isStaticRep,
fixedHdrSize, arrWordsHdrSize, arrPtrsHdrSize,
SMRep(..), ClosureType(..),
isStaticRep,
fixedHdrSize, arrWordsHdrSize, arrPtrsHdrSize,
- profHdrSize,
+ profHdrSize, thunkHdrSize,
tablesNextToCode,
smRepClosureType, smRepClosureTypeInt,
tablesNextToCode,
smRepClosureType, smRepClosureTypeInt,
@@
-251,8
+251,8
@@
data SMRep
= GenericRep -- GC routines consult sizes in info tbl
Bool -- True <=> This is a static closure. Affects how
-- we garbage-collect it
= GenericRep -- GC routines consult sizes in info tbl
Bool -- True <=> This is a static closure. Affects how
-- we garbage-collect it
- !Int -- # ptr words
- !Int -- # non-ptr words
+ !Int -- # ptr words
+ !Int -- # non-ptr words
ClosureType -- closure type
| BlackHoleRep
ClosureType -- closure type
| BlackHoleRep
@@
-285,6
+285,12
@@
arrWordsHdrSize = fixedHdrSize*wORD_SIZE + sIZEOF_StgArrWords_NoHdr
arrPtrsHdrSize :: ByteOff
arrPtrsHdrSize = fixedHdrSize*wORD_SIZE + sIZEOF_StgMutArrPtrs_NoHdr
arrPtrsHdrSize :: ByteOff
arrPtrsHdrSize = fixedHdrSize*wORD_SIZE + sIZEOF_StgMutArrPtrs_NoHdr
+
+-- Thunks have an extra header word on SMP, so the update doesn't
+-- splat the payload.
+thunkHdrSize :: WordOff
+thunkHdrSize = fixedHdrSize + smp_hdr
+ where smp_hdr = sIZEOF_StgSMPThunkHeader `quot` wORD_SIZE
\end{code}
\begin{code}
\end{code}
\begin{code}