diff options
Diffstat (limited to 'vm_insnhelper.h')
-rw-r--r-- | vm_insnhelper.h | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/vm_insnhelper.h b/vm_insnhelper.h index d4dd5aec4..79eb8856f 100644 --- a/vm_insnhelper.h +++ b/vm_insnhelper.h @@ -184,14 +184,24 @@ extern VALUE ruby_vm_const_missing_count; #define BASIC_OP_UNREDEFINED_P(op) (LIKELY(ruby_vm_redefined_flag[op] == 0)) #define HEAP_CLASS_OF(obj) RBASIC(obj)->klass +#ifndef USE_IC_FOR_SPECIALIZED_METHOD +#define USE_IC_FOR_SPECIALIZED_METHOD 1 +#endif + +#if USE_IC_FOR_SPECIALIZED_METHOD + #define CALL_SIMPLE_METHOD(num, id, recv) do { \ VALUE klass = CLASS_OF(recv); \ - CALL_METHOD(num, 0, 0, id, rb_method_entry(klass, id), recv); \ + CALL_METHOD(num, 0, 0, id, vm_method_search(id, klass, ic), recv); \ } while (0) -#define CALL_SIMPLE_METHOD_IC(num, id, recv, ic) do { \ +#else + +#define CALL_SIMPLE_METHOD(num, id, recv) do { \ VALUE klass = CLASS_OF(recv); \ - CALL_METHOD(num, 0, 0, id, vm_method_search(id, klass, ic), recv); \ + CALL_METHOD(num, 0, 0, id, rb_method_entry(klass, id), recv); \ } while (0) +#endif + #endif /* RUBY_INSNHELPER_H */ |