summaryrefslogtreecommitdiff
path: root/vm_insnhelper.c
diff options
context:
space:
mode:
authorko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-18 05:22:13 +0000
committerko1 <ko1@b2dd03c8-39d4-4d8f-98ff-823fe69b080e>2012-10-18 05:22:13 +0000
commit588b73bca2f16f03710d531d64e3dc6a0050c2d7 (patch)
tree21c09160e9799ea78778093736a97d595e295f0a /vm_insnhelper.c
parent676c01bb36d39cf1c0085c4853c9dcbd3b908f35 (diff)
* class.c (rb_define_frameless_method): rename from
rb_define_method_fast(). Defined method with this C API does not make a method frame. It is bit lightweight than ordinal C functions. Now only 0 or 1 argc are permitted. * method.h (VM_METHOD_TYPE_CFUNC_FRAMELESS): rename macro name from VM_METHOD_TYPE_CFUNC_FAST. * vm_insnhelper.c, vm_method.c: rename related functions. * proc.c (rb_method_entry_arity): catch up above changes. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37252 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
Diffstat (limited to 'vm_insnhelper.c')
-rw-r--r--vm_insnhelper.c14
1 files changed, 7 insertions, 7 deletions
diff --git a/vm_insnhelper.c b/vm_insnhelper.c
index 6296748a6e..9c2fb4d46d 100644
--- a/vm_insnhelper.c
+++ b/vm_insnhelper.c
@@ -1506,14 +1506,14 @@ vm_call_opt_call(rb_thread_t *th, rb_control_frame_t *cfp, rb_call_info_t *ci)
}
static VALUE
-vm_call_cfunc_fast_unary(rb_thread_t *th, rb_control_frame_t *cfp, rb_call_info_t *ci)
+vm_call_cfunc_frameless_unary(rb_thread_t *th, rb_control_frame_t *cfp, rb_call_info_t *ci)
{
cfp->sp -= 1;
return (*ci->me->def->body.cfunc.func)(ci->recv);
}
static VALUE
-vm_call_cfunc_fast_binary(rb_thread_t *th, rb_control_frame_t *cfp, rb_call_info_t *ci)
+vm_call_cfunc_frameless_binary(rb_thread_t *th, rb_control_frame_t *cfp, rb_call_info_t *ci)
{
VALUE obj = *cfp->sp;
cfp->sp -= 2;
@@ -1613,16 +1613,16 @@ vm_call_method(rb_thread_t *th, rb_control_frame_t *cfp, rb_call_info_t *ci)
}
break;
}
- case VM_METHOD_TYPE_CFUNC_FAST:
+ case VM_METHOD_TYPE_CFUNC_FRAMELESS:
switch (ci->me->def->body.cfunc.argc) {
case 0:
rb_check_arity(ci->argc, 0, 0);
- CI_SET_FASTPATH(ci, vm_call_cfunc_fast_unary, enable_fastpath && !(ci->flag & VM_CALL_ARGS_SPLAT));
- return vm_call_cfunc_fast_unary(th, cfp, ci);
+ CI_SET_FASTPATH(ci, vm_call_cfunc_frameless_unary, enable_fastpath && !(ci->flag & VM_CALL_ARGS_SPLAT));
+ return vm_call_cfunc_frameless_unary(th, cfp, ci);
case 1:
rb_check_arity(ci->argc, 0, 1);
- CI_SET_FASTPATH(ci, vm_call_cfunc_fast_binary, enable_fastpath && !(ci->flag & VM_CALL_ARGS_SPLAT));
- return vm_call_cfunc_fast_binary(th, cfp, ci);
+ CI_SET_FASTPATH(ci, vm_call_cfunc_frameless_binary, enable_fastpath && !(ci->flag & VM_CALL_ARGS_SPLAT));
+ return vm_call_cfunc_frameless_binary(th, cfp, ci);
default:
rb_bug("vm_call_method: unsupported cfunc_fast argc (%d)", ci->me->def->body.cfunc.argc);
}