module SMRep (
SMRep(..), ClosureType(..),
isConstantRep, isStaticRep,
- fixedHdrSize, arrHdrSize, fixedItblSize, pprSMRep
+ fixedHdrSize, arrWordsHdrSize, arrPtrsHdrSize,
+ fixedItblSize, pprSMRep
#ifndef OMIT_NATIVE_CODEGEN
, getSMRepClosureTypeInt
import CmdLineOpts
import AbsCSyn ( Liveness(..) )
import Constants ( sTD_HDR_SIZE, pROF_HDR_SIZE,
- gRAN_HDR_SIZE, tICKY_HDR_SIZE, aRR_HDR_SIZE,
+ gRAN_HDR_SIZE, tICKY_HDR_SIZE,
+ aRR_WORDS_HDR_SIZE, aRR_PTRS_HDR_SIZE,
sTD_ITBL_SIZE, pROF_ITBL_SIZE,
gRAN_ITBL_SIZE, tICKY_ITBL_SIZE )
import Outputable
tickyHdrSize | opt_DoTickyProfiling = tICKY_HDR_SIZE
| otherwise = 0
-arrHdrSize :: Int{-words-}
-arrHdrSize = fixedHdrSize + aRR_HDR_SIZE
+arrWordsHdrSize :: Int{-words-}
+arrWordsHdrSize = fixedHdrSize + aRR_WORDS_HDR_SIZE
+
+arrPtrsHdrSize :: Int{-words-}
+arrPtrsHdrSize = fixedHdrSize + aRR_PTRS_HDR_SIZE
\end{code}
Size of an info table.
pROF_HDR_SIZE,
gRAN_HDR_SIZE,
tICKY_HDR_SIZE,
- aRR_HDR_SIZE,
+ aRR_WORDS_HDR_SIZE,
+ aRR_PTRS_HDR_SIZE,
sTD_ITBL_SIZE,
pROF_ITBL_SIZE,
Closure header sizes.
\begin{code}
-sTD_HDR_SIZE = (STD_HDR_SIZE :: Int)
-pROF_HDR_SIZE = (PROF_HDR_SIZE :: Int)
-gRAN_HDR_SIZE = (GRAN_HDR_SIZE :: Int)
-tICKY_HDR_SIZE = (TICKY_HDR_SIZE :: Int)
-aRR_HDR_SIZE = (ARR_HDR_SIZE :: Int)
+sTD_HDR_SIZE = (STD_HDR_SIZE :: Int)
+pROF_HDR_SIZE = (PROF_HDR_SIZE :: Int)
+gRAN_HDR_SIZE = (GRAN_HDR_SIZE :: Int)
+tICKY_HDR_SIZE = (TICKY_HDR_SIZE :: Int)
+aRR_WORDS_HDR_SIZE = (ARR_WORDS_HDR_SIZE :: Int)
+aRR_PTRS_HDR_SIZE = (ARR_PTRS_HDR_SIZE :: Int)
\end{code}
Info Table sizes.
stgBaseReg, stgNode, stgSp, stgSu, stgSpLim, stgHp, stgHpLim, stgTagReg,
getUniqLabelNCG,
- fixedHS, arrHS
+ fixedHS, arrWordsHS, arrPtrsHS
) where
#include "HsVersions.h"
import PrimRep ( PrimRep, showPrimRep )
import PrimOp ( PrimOp, pprPrimOp )
import Unique ( Unique )
-import SMRep ( fixedHdrSize, arrHdrSize )
+import SMRep ( fixedHdrSize, arrWordsHdrSize, arrPtrsHdrSize )
import UniqSupply ( returnUs, thenUs, getUniqueUs, UniqSM )
import Outputable
\end{code}
= getUniqueUs `thenUs` \ u ->
returnUs (mkAsmTempLabel u)
-fixedHS = StInt (toInteger fixedHdrSize)
-arrHS = StInt (toInteger arrHdrSize)
+fixedHS = StInt (toInteger fixedHdrSize)
+arrWordsHS = StInt (toInteger arrWordsHdrSize)
+arrPtrsHS = StInt (toInteger arrPtrsHdrSize)
\end{code}
import OrdList ( OrdList )
import PrimOp ( PrimOp(..) )
import PrimRep ( PrimRep(..) )
-import SMRep ( arrHdrSize )
+import SMRep ( arrWordsHdrSize )
import Stix ( sStLitLbl, StixTree(..), StixTreeList )
import UniqSupply ( returnUs, thenUs, UniqSM )
\end{code}
f1 = StAssign IntRep (mpAlloc str) alloc
f2 = StAssign IntRep (mpSize str) size
f3 = StAssign PtrRep (mpData str)
- (StIndex PtrRep arr (StInt (toInteger arrHdrSize)))
+ (StIndex PtrRep arr (StInt (toInteger arrWordsHdrSize)))
in
(f1, f2, f3)
lhs' = amodeToStix lhs
obj' = amodeToStix obj
ix' = amodeToStix ix
- base = StIndex IntRep obj' arrHS
+ base = StIndex IntRep obj' arrPtrsHS
assign = StAssign PtrRep lhs' (StInd PtrRep (StIndex PtrRep base ix'))
in
returnUs (\xs -> assign : xs)
obj' = amodeToStix obj
ix' = amodeToStix ix
v' = amodeToStix v
- base = StIndex IntRep obj' arrHS --(StInt (toInteger 3))
+ base = StIndex IntRep obj' arrPtrsHS
assign = StAssign PtrRep (StInd PtrRep (StIndex PtrRep base ix')) v'
in
returnUs (\xs -> assign : xs)
lhs' = amodeToStix lhs
obj' = amodeToStix obj
ix' = amodeToStix ix
- base = StIndex IntRep obj' arrHS
+ base = StIndex IntRep obj' arrWordsHS
assign = StAssign pk lhs' (StInd pk (StIndex pk base ix'))
in
returnUs (\xs -> assign : xs)
obj' = amodeToStix obj
ix' = amodeToStix ix
v' = amodeToStix v
- base = StIndex IntRep obj' arrHS
+ base = StIndex IntRep obj' arrWordsHS
assign = StAssign pk (StInd pk (StIndex pk base ix')) v'
in
returnUs (\xs -> assign : xs)
let base = amodeToStix' x
in
case getAmodeRep x of
- ArrayRep -> StIndex PtrRep base arrHS
- ByteArrayRep -> StIndex IntRep base arrHS
+ ArrayRep -> StIndex PtrRep base arrPtrsHS
+ ByteArrayRep -> StIndex IntRep base arrWordsHS
ForeignObjRep -> StIndex PtrRep base fixedHS
_ -> base
\end{code}
/* ----------------------------------------------------------------------------
- * $Id: Constants.h,v 1.8 2000/01/13 14:34:00 hwloidl Exp $
+ * $Id: Constants.h,v 1.9 2000/01/24 18:22:08 sewardj Exp $
*
* (c) The GHC Team, 1998-1999
*
#define PAR_HDR_SIZE 0
#define TICKY_HDR_SIZE 0
-#define ARR_HDR_SIZE 1
+#define ARR_WORDS_HDR_SIZE 1
+#define ARR_PTRS_HDR_SIZE 2
/* -----------------------------------------------------------------------------
Info Table sizes