/* ----------------------------------------------------------------------------
- * $Id: InfoTables.h,v 1.14 1999/03/18 17:57:19 simonm Exp $
+ * $Id: InfoTables.h,v 1.16 1999/06/25 09:13:37 simonmar Exp $
*
* (c) The GHC Team, 1998-1999
*
StgWord type : 16; /* } These 2 elements fit into 32 bits */
StgWord srt_len : 16; /* } */
#endif
-#if USE_MINIINTERPRETER
- StgFunPtr (*vector)[];
- StgFunPtr entry;
-#else
+#ifdef TABLES_NEXT_TO_CODE
StgCode code[0];
+#else
+ StgFunPtr entry;
+ StgFunPtr vector[0];
#endif
} StgInfoTable;
+/* Info tables are read-only, therefore we uniformly declare them with
+ * C's const attribute. This isn't just a nice thing to do: it's
+ * necessary because the garbage collector has to distinguish between
+ * closure pointers and info table pointers when traversing the
+ * stack. We distinguish the two by checking whether the pointer is
+ * into text-space or not.
+ */
+
+#define INFO_TBL_CONST const
+
#endif /* INFOTABLES_H */