1
0
Fork 0
mirror of https://github.com/ruby/ruby.git synced 2022-11-09 12:17:21 -05:00

revert r51991

git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@51993 b2dd03c8-39d4-4d8f-98ff-823fe69b080e
This commit is contained in:
nobu 2015-10-01 10:50:49 +00:00
parent eee3546b16
commit a7f64368ae
2 changed files with 5 additions and 12 deletions

View file

@ -941,10 +941,10 @@ send
(VALUE val) // inc += - (int)(ci->orig_argc + ((ci->flag & VM_CALL_ARGS_BLOCKARG) ? 1 : 0));
{
struct rb_calling_info calling;
VALUE mark = vm_caller_setup_arg_block(th, reg_cfp, &calling, ci, blockiseq, FALSE);
vm_caller_setup_arg_block(th, reg_cfp, &calling, ci, blockiseq, FALSE);
vm_search_method(ci, cc, calling.recv = TOPN(calling.argc = ci->orig_argc));
CALL_METHOD(&calling, ci, cc);
RB_GC_GUARD(mark);
}
DEFINE_INSN
@ -989,15 +989,13 @@ invokesuper
(...)
(VALUE val) // inc += - (int)(ci->orig_argc + ((ci->flag & VM_CALL_ARGS_BLOCKARG) ? 1 : 0));
{
VALUE mark;
struct rb_calling_info calling;
calling.argc = ci->orig_argc;
mark = vm_caller_setup_arg_block(th, reg_cfp, &calling, ci, blockiseq, TRUE);
vm_caller_setup_arg_block(th, reg_cfp, &calling, ci, blockiseq, TRUE);
calling.recv = GET_SELF();
vm_search_super_method(th, GET_CFP(), &calling, ci, cc);
CALL_METHOD(&calling, ci, cc);
RB_GC_GUARD(mark);
}
/**

View file

@ -766,11 +766,10 @@ vm_caller_setup_arg_kw(rb_control_frame_t *cfp, struct rb_calling_info *calling,
calling->argc -= kw_len - 1;
}
static VALUE
static void
vm_caller_setup_arg_block(const rb_thread_t *th, rb_control_frame_t *reg_cfp,
struct rb_calling_info *calling, const struct rb_call_info *ci, rb_iseq_t *blockiseq, const int is_super)
{
VALUE mark = 0;
if (ci->flag & VM_CALL_ARGS_BLOCKARG) {
rb_proc_t *po;
VALUE proc;
@ -779,10 +778,8 @@ vm_caller_setup_arg_block(const rb_thread_t *th, rb_control_frame_t *reg_cfp,
if (SYMBOL_P(proc) && rb_method_basic_definition_p(rb_cSymbol, idTo_proc)) {
calling->blockptr = RUBY_VM_GET_BLOCK_PTR_IN_CFP(reg_cfp);
blockiseq = (rb_iseq_t *)IFUNC_NEW(rb_sym_proc_call, SYM2ID(proc), 0);
calling->blockptr->iseq = blockiseq;
calling->blockptr->iseq = (rb_iseq_t *)IFUNC_NEW(rb_sym_proc_call, SYM2ID(proc), 0);
calling->blockptr->proc = 0;
mark = (VALUE)blockiseq;
}
else if (!NIL_P(proc)) {
if (!rb_obj_is_proc(proc)) {
@ -817,8 +814,6 @@ vm_caller_setup_arg_block(const rb_thread_t *th, rb_control_frame_t *reg_cfp,
calling->blockptr = NULL;
}
}
return mark;
}
#define IS_ARGS_SPLAT(ci) ((ci)->flag & VM_CALL_ARGS_SPLAT)