X-Git-Url: http://git.megacz.com/?a=blobdiff_plain;f=compiler%2Fmain%2FConstants.lhs;h=0437217cf67d1aade887f8f5cd5353012a830506;hb=0c45d82423fcff64b43b95ab4882b26e7de560bf;hp=4f13af8828a0329325df49b66f2ed3c8b4c80424;hpb=dc8ffcb9797ade3e3a68e6ec0a89fe2e7444e0ef;p=ghc-hetmet.git diff --git a/compiler/main/Constants.lhs b/compiler/main/Constants.lhs index 4f13af8..0437217 100644 --- a/compiler/main/Constants.lhs +++ b/compiler/main/Constants.lhs @@ -4,8 +4,17 @@ \section[Constants]{Info about this compilation} \begin{code} +{-# OPTIONS -w #-} +-- The above warning supression flag is a temporary kludge. +-- While working on this module you are encouraged to remove it and fix +-- any warnings in the module. See +-- http://hackage.haskell.org/trac/ghc/wiki/Commentary/CodingStyle#Warnings +-- for details + 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 @@ -108,6 +117,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}