From c346a002e070450c2f037c65475964d47fc8971f Mon Sep 17 00:00:00 2001 From: simonmar Date: Wed, 27 Oct 1999 09:57:48 +0000 Subject: [PATCH] [project @ 1999-10-27 09:57:48 by simonmar] small cleanup; reduce amount of conditionally-compiled stuff --- ghc/includes/ClosureMacros.h | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/ghc/includes/ClosureMacros.h b/ghc/includes/ClosureMacros.h index f7895ee..6cfeb66 100644 --- a/ghc/includes/ClosureMacros.h +++ b/ghc/includes/ClosureMacros.h @@ -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 * @@ -59,10 +59,11 @@ #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 -------------------------------------------------------------------------- */ -- 1.7.10.4