Changing internal data structures used by Hpc
[ghc-hetmet.git] / includes / InfoTables.h
index 8fa699a..67bd97b 100644 (file)
@@ -353,7 +353,6 @@ typedef struct {
 #else
     StgInfoTable i;
     StgSRT      *srt;  /* pointer to the SRT table */
-    StgFunPtr vector[FLEXIBLE_ARRAY];
 #endif
 } StgRetInfoTable;
 
@@ -380,6 +379,23 @@ typedef struct _StgThunkInfoTable {
 #endif
 } StgThunkInfoTable;
 
+/* -----------------------------------------------------------------------------
+   Constructor info tables
+   -------------------------------------------------------------------------- */
+
+typedef struct _StgConInfoTable {
+#if !defined(TABLES_NEXT_TO_CODE)
+    StgInfoTable i;
+#endif
+
+    OFFSET_FIELD(con_desc) // the name of the data constructor 
+                           // as: Package:Module.Name
+
+#if defined(TABLES_NEXT_TO_CODE)
+    StgInfoTable i;
+#endif
+} StgConInfoTable;
+
 
 /* -----------------------------------------------------------------------------
    Accessor macros for fields that might be offsets (C version)
@@ -396,6 +412,16 @@ typedef struct _StgThunkInfoTable {
 #endif
 
 /*
+ * GET_CON_DESC(info)
+ * info must be a StgConInfoTable*.
+ */
+#ifdef TABLES_NEXT_TO_CODE
+#define GET_CON_DESC(info) ((char *)((StgWord)((info)+1) + (info->con_desc)))
+#else
+#define GET_CON_DESC(info) ((info)->con_desc)
+#endif
+
+/*
  * GET_FUN_SRT(info)
  * info must be a StgFunInfoTable*
  */