From 2256bb07b02c9025ed7ea1fee8c21c86104c07dc Mon Sep 17 00:00:00 2001 From: "Yukihiro \"Matz\" Matsumoto" Date: Mon, 16 Sep 2019 11:14:13 +0900 Subject: Remove `MRB_METHOD_TABLE_INLINE`. `MRB_METHOD_TABLE_INLINE` was fragile. It requires `-falign-functions=n`. On platform that uses higher bits of function pointers, you can use new `MRB_METHOD_T_STRUCT` configuration macro. --- include/mrbconf.h | 15 +++------------ 1 file changed, 3 insertions(+), 12 deletions(-) (limited to 'include/mrbconf.h') diff --git a/include/mrbconf.h b/include/mrbconf.h index f5e8858ce..c5b9afd05 100644 --- a/include/mrbconf.h +++ b/include/mrbconf.h @@ -36,10 +36,9 @@ /* size of the method cache (need to be the power of 2) */ //#define MRB_METHOD_CACHE_SIZE (1<<7) -/* add -DMRB_METHOD_TABLE_INLINE to reduce the size of method table */ -/* MRB_METHOD_TABLE_INLINE requires LSB of function pointers to be zero */ -/* you might need to specify --falign-functions=n (where n>1) */ -//#define MRB_METHOD_TABLE_INLINE +/* add -DMRB_METHOD_T_STRUCT on machines that use higher bits of pointers */ +/* no MRB_METHOD_T_STRUCT requires highest 2 bits of function pointers to be zero */ +//#define MRB_METHOD_T_STRUCT /* add -DMRB_INT16 to use 16bit integer for mrb_int; conflict with MRB_INT32 and MRB_INT64 */ //#define MRB_INT16 @@ -190,10 +189,6 @@ # define MRB_METHOD_CACHE_SIZE (1<<10) # endif -# ifndef MRB_METHOD_TABLE_INLINE -# define MRB_METHOD_TABLE_INLINE -# endif - # ifndef MRB_IV_SEGMENT_SIZE # define MRB_IV_SEGMENT_SIZE 32 # endif @@ -212,10 +207,6 @@ # define MRB_METHOD_CACHE_SIZE (1<<12) # endif -# ifndef MRB_METHOD_TABLE_INLINE -# define MRB_METHOD_TABLE_INLINE -# endif - # ifndef MRB_IV_SEGMENT_SIZE # define MRB_IV_SEGMENT_SIZE 64 # endif -- cgit v1.2.3