+
+ StgClosureInfo layout; /* closure layout info (one word) */
+
+ StgHalfWord type; /* closure type */
+ StgHalfWord srt_bitmap; /* number of entries in SRT (or constructor tag) */
+
+#ifdef TABLES_NEXT_TO_CODE
+ StgCode code[FLEXIBLE_ARRAY];
+#endif
+} StgInfoTable;
+
+
+/* -----------------------------------------------------------------------------
+ Function info tables
+
+ This is the general form of function info tables. The compiler
+ will omit some of the fields in common cases:
+
+ - If fun_type is not ARG_GEN or ARG_GEN_BIG, then the slow_apply
+ and bitmap fields may be left out (they are at the end, so omitting
+ them doesn't affect the layout).
+
+ - If srt_bitmap (in the std info table part) is zero, then the srt
+ field may be omitted. This only applies if the slow_apply and
+ bitmap fields have also been omitted.
+ -------------------------------------------------------------------------- */
+
+typedef struct _StgFunInfoExtraRev {
+ OFFSET_FIELD ( slow_apply_offset ); /* apply to args on the stack */
+ union {
+ StgWord bitmap;
+ OFFSET_FIELD ( bitmap_offset ); /* arg ptr/nonptr bitmap */
+ } b;
+ OFFSET_FIELD ( srt_offset ); /* pointer to the SRT table */
+ StgHalfWord fun_type; /* function type */
+ StgHalfWord arity; /* function arity */
+} StgFunInfoExtraRev;
+
+typedef struct _StgFunInfoExtraFwd {
+ StgHalfWord fun_type; /* function type */
+ StgHalfWord arity; /* function arity */
+ StgSRT *srt; /* pointer to the SRT table */
+ union { /* union for compat. with TABLES_NEXT_TO_CODE version */
+ StgWord bitmap; /* arg ptr/nonptr bitmap */
+ } b;
+ StgFun *slow_apply; /* apply to args on the stack */
+} StgFunInfoExtraFwd;
+
+typedef struct {
+#if defined(TABLES_NEXT_TO_CODE)
+ StgFunInfoExtraRev f;
+ StgInfoTable i;
+#else
+ StgInfoTable i;
+ StgFunInfoExtraFwd f;
+#endif
+} StgFunInfoTable;
+
+/* -----------------------------------------------------------------------------
+ Return info tables
+ -------------------------------------------------------------------------- */
+
+/*
+ * When info tables are laid out backwards, we can omit the SRT
+ * pointer iff srt_bitmap is zero.
+ */
+
+typedef struct {
+#if defined(TABLES_NEXT_TO_CODE)
+ OFFSET_FIELD( srt_offset ); /* offset to the SRT table */
+ StgInfoTable i;