X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FConstants.lhs;h=2e0c4d4095240416c6de90a91e85e92268250ced;hb=0b9530245a33b8206ca38b9de6dfb01e056fd8dc;hp=2d72df2710c712fa9aaac584562371f0bc7c6ef4;hpb=9ff76535edb25ab7434284adddb5c64708ecb547;p=ghc-hetmet.git diff --git a/compiler/main/Constants.lhs b/compiler/main/Constants.lhs index 2d72df2..2e0c4d4 100644 --- a/compiler/main/Constants.lhs +++ b/compiler/main/Constants.lhs @@ -6,6 +6,8 @@ \begin{code} module Constants (module Constants) where +import Data.Bits (shiftL) + -- This magical #include brings in all the everybody-knows-these magic -- constants unfortunately, we need to be *explicit* about which one -- we want; if we just hope a -I... will get the right one, we could @@ -79,16 +81,6 @@ pROF_HDR_SIZE = (PROF_HDR_SIZE :: Int) gRAN_HDR_SIZE = (GRAN_HDR_SIZE :: Int) \end{code} -Info Table sizes. - -\begin{code} -sTD_ITBL_SIZE = (STD_ITBL_SIZE :: Int) -rET_ITBL_SIZE = (RET_ITBL_SIZE :: Int) -pROF_ITBL_SIZE = (PROF_ITBL_SIZE :: Int) -gRAN_ITBL_SIZE = (GRAN_ITBL_SIZE :: Int) -tICKY_ITBL_SIZE = (TICKY_ITBL_SIZE :: Int) -\end{code} - Size of a double in StgWords. \begin{code} @@ -118,6 +110,14 @@ wORD_SIZE = (SIZEOF_HSWORD :: Int) wORD_SIZE_IN_BITS = wORD_SIZE * 8 :: Int \end{code} +Amount of pointer bits used for semi-tagging constructor closures + +\begin{code} +tAG_BITS = (TAG_BITS :: Int) +tAG_MASK = ((1 `shiftL` tAG_BITS) - 1) :: Int +mAX_PTR_TAG = tAG_MASK :: Int +\end{code} + Size of a C int, in bytes. May be smaller than wORD_SIZE. \begin{code}