replace sparc-specific Int64 code with calls to platform-independent macros
[ghc-hetmet.git] / includes / ClosureMacros.h
index f40f6aa..1c371b2 100644 (file)
@@ -59,6 +59,7 @@
 #define get_ret_itbl(c) (RET_INFO_PTR_TO_STRUCT((c)->header.info))
 #define get_fun_itbl(c) (FUN_INFO_PTR_TO_STRUCT((c)->header.info))
 #define get_thunk_itbl(c) (THUNK_INFO_PTR_TO_STRUCT((c)->header.info))
+#define get_con_itbl(c) (CON_INFO_PTR_TO_STRUCT((c)->header.info))
 
 #define GET_TAG(con) (get_itbl(con)->srt_bitmap)
 
 #define RET_INFO_PTR_TO_STRUCT(info) ((StgRetInfoTable *)(info) - 1)
 #define FUN_INFO_PTR_TO_STRUCT(info) ((StgFunInfoTable *)(info) - 1)
 #define THUNK_INFO_PTR_TO_STRUCT(info) ((StgThunkInfoTable *)(info) - 1)
+#define CON_INFO_PTR_TO_STRUCT(info) ((StgConInfoTable *)(info) - 1)
 #define itbl_to_fun_itbl(i) ((StgFunInfoTable *)(((StgInfoTable *)(i) + 1)) - 1)
 #define itbl_to_ret_itbl(i) ((StgRetInfoTable *)(((StgInfoTable *)(i) + 1)) - 1)
 #define itbl_to_thunk_itbl(i) ((StgThunkInfoTable *)(((StgInfoTable *)(i) + 1)) - 1)
+#define itbl_to_con_itbl(i) ((StgConInfoTable *)(((StgInfoTable *)(i) + 1)) - 1)
 #else
 #define INFO_PTR_TO_STRUCT(info) ((StgInfoTable *)info)
 #define RET_INFO_PTR_TO_STRUCT(info) ((StgRetInfoTable *)info)
 #define FUN_INFO_PTR_TO_STRUCT(info) ((StgFunInfoTable *)info)
 #define THUNK_INFO_PTR_TO_STRUCT(info) ((StgThunkInfoTable *)info)
+#define CON_INFO_PTR_TO_STRUCT(info) ((StgConInfoTable *)info)
 #define itbl_to_fun_itbl(i) ((StgFunInfoTable *)(i))
 #define itbl_to_ret_itbl(i) ((StgRetInfoTable *)(i))
 #define itbl_to_thunk_itbl(i) ((StgThunkInfoTable *)(i))
+#define itbl_to_con_itbl(i) ((StgConInfoTable *)(i))
 #endif
 
 /* -----------------------------------------------------------------------------
 #define SET_STATIC_PROF_HDR(ccs)
 #endif
 
-#ifdef GRAN
-#define SET_GRAN_HDR(c,pe)             (c)->header.gran.procs = pe
-#define SET_STATIC_GRAN_HDR            gran : { procs : Everywhere },
-#else
-#define SET_GRAN_HDR(c,pe)
-#define SET_STATIC_GRAN_HDR
-#endif
-
-#ifdef PAR
-#define SET_PAR_HDR(c,stuff)
-#define SET_STATIC_PAR_HDR(stuff)
-#else
-#define SET_PAR_HDR(c,stuff)
-#define SET_STATIC_PAR_HDR(stuff)
-#endif
-
 #ifdef TICKY_TICKY
 #define SET_TICKY_HDR(c,stuff)      /* old: (c)->header.ticky.updated = stuff */
 #define SET_STATIC_TICKY_HDR(stuff)  /* old: ticky : { updated : stuff } */
 #define SET_HDR(c,_info,ccs)                           \
    {                                                   \
        (c)->header.info = _info;                       \
-       SET_GRAN_HDR((StgClosure *)(c),ThisPE);         \
-       SET_PAR_HDR((StgClosure *)(c),LOCAL_GA);        \
        SET_PROF_HDR((StgClosure *)(c),ccs);            \
        SET_TICKY_HDR((StgClosure *)(c),0);             \
    }