aboutsummaryrefslogtreecommitdiffstats
path: root/vm_insnhelper.h
diff options
context:
space:
mode:
Diffstat (limited to 'vm_insnhelper.h')
-rw-r--r--vm_insnhelper.h23
1 files changed, 6 insertions, 17 deletions
diff --git a/vm_insnhelper.h b/vm_insnhelper.h
index 8b8da831a3..c6b2fbefdb 100644
--- a/vm_insnhelper.h
+++ b/vm_insnhelper.h
@@ -189,8 +189,8 @@ enum vm_regan_acttype {
} \
} while (0)
-#define CALL_METHOD(num, blockptr, flag, id, me, recv, defined_class) do { \
- VALUE v = vm_call_method(th, GET_CFP(), (num), (blockptr), (flag), (id), (me), (recv), (defined_class)); \
+#define CALL_METHOD(ci) do { \
+ VALUE v = (*(ci)->call)(th, GET_CFP(), (ci)); \
if (v == Qundef) { \
RESTORE_REGS(); \
NEXT_INSN(); \
@@ -235,23 +235,12 @@ enum vm_regan_acttype {
#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), defined_class; \
- const rb_method_entry_t *me = vm_method_search((id), klass, ci, &defined_class); \
- CALL_METHOD((num), 0, 0, (id), me, (recv), defined_class); \
+#define CALL_SIMPLE_METHOD(recv) do { \
+ ci->blockptr = 0; ci->argc = ci->orig_argc; \
+ vm_search_method(ci, ci->recv = (recv)); \
+ CALL_METHOD(ci); \
} while (0)
-#else
-
-#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)); \
-} while (0)
-
-#endif
-
static VALUE ruby_vm_global_state_version = 1;
#define GET_VM_STATE_VERSION() (ruby_vm_global_state_version)