summaryrefslogtreecommitdiff
path: root/includes/rts/storage/ClosureMacros.h
diff options
context:
space:
mode:
authorIan Lynagh <ian@well-typed.com>2012-08-25 12:49:47 +0100
committerIan Lynagh <ian@well-typed.com>2012-08-25 12:49:47 +0100
commit6252300e93bcadab708667382925532dfb61c749 (patch)
tree9a031872b00f4ee10af7a954d8a2de4aa6d16d39 /includes/rts/storage/ClosureMacros.h
parent8413d83859ee0120e52bb1b3cd775b7344b52c76 (diff)
downloadhaskell-6252300e93bcadab708667382925532dfb61c749.tar.gz
Convert a couple more macros to inline functions
This caused a couple of .o files to change size. I had a look at one, and it seems to be caused by the difference in size of these two instructions: 49 8b 5d 08 mov 0x8(%r13),%rbx 49 8b 5c 24 08 mov 0x8(%r12),%rbx (with a few nops being added or removed later in the file, presumably for alignment reasons).
Diffstat (limited to 'includes/rts/storage/ClosureMacros.h')
-rw-r--r--includes/rts/storage/ClosureMacros.h9
1 files changed, 7 insertions, 2 deletions
diff --git a/includes/rts/storage/ClosureMacros.h b/includes/rts/storage/ClosureMacros.h
index 444283897e..9c4f181db3 100644
--- a/includes/rts/storage/ClosureMacros.h
+++ b/includes/rts/storage/ClosureMacros.h
@@ -76,8 +76,13 @@
EXTERN_INLINE StgInfoTable *get_itbl(StgClosure *c);
EXTERN_INLINE StgInfoTable *get_itbl(StgClosure *c) {return INFO_PTR_TO_STRUCT(c->header.info);}
-#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))
+
+EXTERN_INLINE StgRetInfoTable *get_ret_itbl(StgClosure *c);
+EXTERN_INLINE StgRetInfoTable *get_ret_itbl(StgClosure *c) {return RET_INFO_PTR_TO_STRUCT(c->header.info);}
+
+INLINE_HEADER StgFunInfoTable *get_fun_itbl(StgClosure *c);
+INLINE_HEADER StgFunInfoTable *get_fun_itbl(StgClosure *c) {return 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))