Implement generalised list comprehensions
[ghc-hetmet.git] / compiler / main / Constants.lhs
index 43db932..5db909d 100644 (file)
@@ -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
@@ -23,8 +32,8 @@ module Constants (module Constants) where
 All pretty arbitrary:
 
 \begin{code}
-mAX_TUPLE_SIZE = (62 :: Int)   -- Should really match the number
-                               -- of decls in Data.Tuple
+mAX_TUPLE_SIZE = (62 :: Int)    -- Should really match the number
+                                -- of decls in Data.Tuple
 mAX_CONTEXT_REDUCTION_DEPTH = (20 :: Int)
 \end{code}
 
@@ -56,11 +65,6 @@ mAX_CHARLIKE = MAX_CHARLIKE
 A section of code-generator-related MAGIC CONSTANTS.
 
 \begin{code}
-mAX_FAMILY_SIZE_FOR_VEC_RETURNS = (MAX_VECTORED_RTN::Int)  -- pretty arbitrary
--- If you change this, you may need to change runtimes/standard/Update.lhc
-\end{code}
-
-\begin{code}
 mAX_Vanilla_REG        = (MAX_VANILLA_REG :: Int)
 mAX_Float_REG  = (MAX_FLOAT_REG :: Int)
 mAX_Double_REG = (MAX_DOUBLE_REG :: Int)
@@ -84,16 +88,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}
@@ -116,6 +110,13 @@ returning to the scheduler.
 rESERVED_STACK_WORDS = (RESERVED_STACK_WORDS :: Int)
 \end{code}
 
+Continuations that need more than this amount of stack should do their
+own stack check (see bug #1466).
+
+\begin{code}
+aP_STACK_SPLIM = (AP_STACK_SPLIM :: Int)
+\end{code}
+
 Size of a word, in bytes
 
 \begin{code}
@@ -123,6 +124,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}