mirror of
https://github.com/mruby/mruby
synced 2026-06-08 16:11:16 +00:00
class.c: Remove MRB_INLINE_METHOD_CACHE support from mt_tbl
The sorted array binary search implementation no longer uses the inline cache array, so remove all MRB_INLINE_METHOD_CACHE definitions and related code.
This commit is contained in:
@@ -42,12 +42,6 @@
|
||||
#error Cannot define MRB_USE_FLOAT32 and MRB_NO_FLOAT at the same time
|
||||
#endif
|
||||
|
||||
/* add -DMRB_NO_METHOD_CACHE to disable method cache to save memory */
|
||||
//#define MRB_NO_METHOD_CACHE
|
||||
/* size of the method cache (need to be the power of 2) */
|
||||
//#define MRB_METHOD_CACHE_SIZE (1<<8)
|
||||
//#define MRB_USE_INLINE_METHOD_CACHE
|
||||
|
||||
/* define on big endian machines; used by MRB_NAN_BOXING, etc. */
|
||||
#ifndef MRB_ENDIAN_BIG
|
||||
# if (defined(BYTE_ORDER) && defined(BIG_ENDIAN) && BYTE_ORDER == BIG_ENDIAN) || \
|
||||
|
||||
@@ -50,11 +50,6 @@ typedef struct mt_tbl {
|
||||
union mt_ptr *ptr; /* block: [ ptr[0...alloc] | keys[0...alloc] ] */
|
||||
} mt_tbl;
|
||||
|
||||
#ifdef MRB_USE_INLINE_METHOD_CACHE
|
||||
#define MT_INLINE_CACHE_SIZE 256
|
||||
static uint8_t mt_cache[MT_INLINE_CACHE_SIZE];
|
||||
#endif
|
||||
|
||||
/* helper to get keys array */
|
||||
static inline mrb_sym*
|
||||
mt_keys(mt_tbl *t) {
|
||||
|
||||
Reference in New Issue
Block a user