[project @ 2001-08-21 10:00:22 by simonpj]
[ghc-hetmet.git] / ghc / includes / InfoTables.h
index 498f6b8..f9b97eb 100644 (file)
@@ -1,5 +1,5 @@
 /* ----------------------------------------------------------------------------
- * $Id: InfoTables.h,v 1.19 2000/04/05 15:27:59 simonmar Exp $
+ * $Id: InfoTables.h,v 1.21 2001/03/22 03:51:09 hwloidl Exp $
  * 
  * (c) The GHC Team, 1998-1999
  *
@@ -117,14 +117,15 @@ typedef struct {
 
 /* The type flags provide quick access to certain properties of a closure. */
 
-#define _HNF (1<<0)  /* head normal form?  */
+#define _HNF (1<<0)  /* head normal form?    */
 #define _BTM (1<<1)  /* bitmap-style layout? */
-#define _NS  (1<<2)  /* non-sparkable      */
-#define _STA (1<<3)  /* static?            */
-#define _THU (1<<4)  /* thunk?             */
-#define _MUT (1<<5)  /* mutable?           */
-#define _UPT (1<<6)  /* unpointed?         */
-#define _SRT (1<<7)  /* has an SRT?        */
+#define _NS  (1<<2)  /* non-sparkable        */
+#define _STA (1<<3)  /* static?              */
+#define _THU (1<<4)  /* thunk?               */
+#define _MUT (1<<5)  /* mutable?             */
+#define _UPT (1<<6)  /* unpointed?           */
+#define _SRT (1<<7)  /* has an SRT?          */
+#define _IND (1<<8)  /* is an indirection?   */
 
 #define isSTATIC(flags)    ((flags) &_STA)
 #define isMUTABLE(flags)   ((flags) &_MUT)
@@ -146,6 +147,7 @@ extern StgWord16 closure_flags[];
 #define closure_MUTABLE(c)      (  closureFlags(c) & _MUT)
 #define closure_UNPOINTED(c)    (  closureFlags(c) & _UPT)
 #define closure_SRT(c)          (  closureFlags(c) & _SRT)
+#define closure_IND(c)          (  closureFlags(c) & _IND)
 
 /* same as above but for info-ptr rather than closure */
 #define ipFlags(ip)             (closure_flags[ip->type])
@@ -158,6 +160,7 @@ extern StgWord16 closure_flags[];
 #define ip_MUTABLE(ip)          (  ipFlags(ip) & _MUT)
 #define ip_UNPOINTED(ip)        (  ipFlags(ip) & _UPT)
 #define ip_SRT(ip)              (  ipFlags(ip) & _SRT)
+#define ip_IND(ip)              (  ipFlags(ip) & _IND)
 
 /* -----------------------------------------------------------------------------
    Info Tables