* vm_insnhelper.c (VM_CALLEE_SETUP_ARG): skip CI_SET_FASTPATH() if
it was called from vm_yield_setup_args(). git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@37187 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
parent
c4457e03c6
commit
f9e50b05b1
@ -1,3 +1,8 @@
|
|||||||
|
Mon Oct 15 09:41:17 2012 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
|
* vm_insnhelper.c (VM_CALLEE_SETUP_ARG): skip CI_SET_FASTPATH() if
|
||||||
|
it was called from vm_yield_setup_args().
|
||||||
|
|
||||||
Mon Oct 15 05:20:13 2012 Koichi Sasada <ko1@atdot.net>
|
Mon Oct 15 05:20:13 2012 Koichi Sasada <ko1@atdot.net>
|
||||||
|
|
||||||
* vm_insnhelper.h CI_SET_FASTPATH: introduce new macro
|
* vm_insnhelper.h CI_SET_FASTPATH: introduce new macro
|
||||||
|
@ -1176,14 +1176,14 @@ vm_callee_setup_arg_complex(rb_thread_t *th, rb_call_info_t *ci, const rb_iseq_t
|
|||||||
|
|
||||||
static VALUE vm_call_iseq_setup_2(rb_thread_t *th, rb_control_frame_t *cfp, rb_call_info_t *ci);
|
static VALUE vm_call_iseq_setup_2(rb_thread_t *th, rb_control_frame_t *cfp, rb_call_info_t *ci);
|
||||||
|
|
||||||
#define VM_CALLEE_SETUP_ARG(th, ci, iseq, argv) \
|
#define VM_CALLEE_SETUP_ARG(th, ci, iseq, argv, is_lambda) \
|
||||||
if (LIKELY((iseq)->arg_simple & 0x01)) { \
|
if (LIKELY((iseq)->arg_simple & 0x01)) { \
|
||||||
/* simple check */ \
|
/* simple check */ \
|
||||||
if ((ci)->argc != (iseq)->argc) { \
|
if ((ci)->argc != (iseq)->argc) { \
|
||||||
argument_error((iseq), ((ci)->argc), (iseq)->argc, (iseq)->argc); \
|
argument_error((iseq), ((ci)->argc), (iseq)->argc, (iseq)->argc); \
|
||||||
} \
|
} \
|
||||||
(ci)->opt_pc = 0; \
|
(ci)->opt_pc = 0; \
|
||||||
CI_SET_FASTPATH((ci), vm_call_iseq_setup_2); \
|
if (!is_lambda) CI_SET_FASTPATH((ci), vm_call_iseq_setup_2); \
|
||||||
} \
|
} \
|
||||||
else { \
|
else { \
|
||||||
(ci)->opt_pc = vm_callee_setup_arg_complex((th), (ci), (iseq), (argv)); \
|
(ci)->opt_pc = vm_callee_setup_arg_complex((th), (ci), (iseq), (argv)); \
|
||||||
@ -1192,7 +1192,7 @@ static VALUE vm_call_iseq_setup_2(rb_thread_t *th, rb_control_frame_t *cfp, rb_c
|
|||||||
static VALUE
|
static VALUE
|
||||||
vm_call_iseq_setup(rb_thread_t *th, rb_control_frame_t *cfp, rb_call_info_t *ci)
|
vm_call_iseq_setup(rb_thread_t *th, rb_control_frame_t *cfp, rb_call_info_t *ci)
|
||||||
{
|
{
|
||||||
VM_CALLEE_SETUP_ARG(th, ci, ci->me->def->body.iseq, cfp->sp - ci->argc);
|
VM_CALLEE_SETUP_ARG(th, ci, ci->me->def->body.iseq, cfp->sp - ci->argc, 0);
|
||||||
return vm_call_iseq_setup_2(th, cfp, ci);
|
return vm_call_iseq_setup_2(th, cfp, ci);
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -1955,7 +1955,7 @@ vm_yield_setup_args(rb_thread_t * const th, const rb_iseq_t *iseq,
|
|||||||
ci_entry.flag = 0;
|
ci_entry.flag = 0;
|
||||||
ci_entry.argc = argc;
|
ci_entry.argc = argc;
|
||||||
ci_entry.blockptr = (rb_block_t *)blockptr;
|
ci_entry.blockptr = (rb_block_t *)blockptr;
|
||||||
VM_CALLEE_SETUP_ARG(th, &ci_entry, iseq, argv);
|
VM_CALLEE_SETUP_ARG(th, &ci_entry, iseq, argv, 1);
|
||||||
return ci_entry.opt_pc;
|
return ci_entry.opt_pc;
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
|
Loading…
x
Reference in New Issue
Block a user