[project @ 1999-10-27 09:57:48 by simonmar]
authorsimonmar <unknown>
Wed, 27 Oct 1999 09:57:48 +0000 (09:57 +0000)
committersimonmar <unknown>
Wed, 27 Oct 1999 09:57:48 +0000 (09:57 +0000)
small cleanup; reduce amount of conditionally-compiled stuff

ghc/includes/ClosureMacros.h

index f7895ee..6cfeb66 100644 (file)
@@ -1,5 +1,5 @@
 /* ----------------------------------------------------------------------------
- * $Id: ClosureMacros.h,v 1.19 1999/08/03 15:44:21 simonmar Exp $
+ * $Id: ClosureMacros.h,v 1.20 1999/10/27 09:57:48 simonmar Exp $
  *
  * (c) The GHC Team, 1998-1999
  *
 #define INIT_INFO(i)  info : &(i)
 #define SET_INFO(c,i) ((c)->header.info = (i))
 #define GET_INFO(c)   ((c)->header.info)
+#define GET_ENTRY(c)  (ENTRY_CODE(GET_INFO(c)))
+#define get_itbl(c)   (INFO_PTR_TO_STRUCT((c)->header.info))
 
 #ifdef TABLES_NEXT_TO_CODE
 #define INIT_ENTRY(e)    code : {}
-#define GET_ENTRY(c)     ((StgFunPtr)((c)->header.info))
 #define ENTRY_CODE(info) (info)
 #define INFO_PTR_TO_STRUCT(info) ((StgInfoTable *)(info) - 1)
 static __inline__ StgFunPtr get_entry(const StgInfoTable *itbl) {
@@ -70,7 +71,6 @@ static __inline__ StgFunPtr get_entry(const StgInfoTable *itbl) {
 }
 #else
 #define INIT_ENTRY(e)    entry : (F_)(e)
-#define GET_ENTRY(c)     ((c)->header.info->entry)
 #define ENTRY_CODE(info) (((StgInfoTable *)info)->entry)
 #define INFO_PTR_TO_STRUCT(info) ((StgInfoTable *)info)
 static __inline__ StgFunPtr get_entry(const StgInfoTable *itbl) {
@@ -78,8 +78,6 @@ static __inline__ StgFunPtr get_entry(const StgInfoTable *itbl) {
 }
 #endif
 
-#define get_itbl(c)      (INFO_PTR_TO_STRUCT((c)->header.info))
-
 /* -----------------------------------------------------------------------------
    Macros for distinguishing data pointers from code pointers
    -------------------------------------------------------------------------- */