From 1dc7906b17ddd17a2ec2af9c1f2e44c6fb7d22e8 Mon Sep 17 00:00:00 2001 From: ko1 Date: Mon, 5 Jun 2017 05:43:58 +0000 Subject: [PATCH] remove arg_setup_lambda. * vm_args.c (enum arg_setup_type): remove arg_setup_lambda because it is same as arg_setup_method. git-svn-id: svn+ssh://ci.ruby-lang.org/ruby/trunk@59014 b2dd03c8-39d4-4d8f-98ff-823fe69b080e --- vm.c | 2 +- vm_args.c | 5 +---- vm_insnhelper.c | 2 +- 3 files changed, 3 insertions(+), 6 deletions(-) diff --git a/vm.c b/vm.c index 1cbd3b9262..faca7c41a1 100644 --- a/vm.c +++ b/vm.c @@ -1021,7 +1021,7 @@ invoke_iseq_block_from_c(rb_thread_t *th, const struct rb_captured_block *captur } opt_pc = vm_yield_setup_args(th, iseq, argc, sp, passed_block_handler, - (is_lambda ? (splattable ? arg_setup_lambda : arg_setup_method) : arg_setup_block)); + (is_lambda ? arg_setup_method : arg_setup_block)); cfp->sp = sp; if (me == NULL) { diff --git a/vm_args.c b/vm_args.c index ae27d27d8c..59bd87ebf0 100644 --- a/vm_args.c +++ b/vm_args.c @@ -29,8 +29,7 @@ struct args_info { enum arg_setup_type { arg_setup_method, - arg_setup_block, - arg_setup_lambda + arg_setup_block }; static inline int @@ -595,8 +594,6 @@ setup_parameters_complex(rb_thread_t * const th, const rb_iseq_t * const iseq, given_argc = RARRAY_LENINT(args->rest); } break; - case arg_setup_lambda: - break; } /* argc check */ diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 55eb00f86b..e70cb646da 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -2677,7 +2677,7 @@ vm_invoke_iseq_block(rb_thread_t *th, rb_control_frame_t *reg_cfp, const rb_iseq_t *iseq = rb_iseq_check(captured->code.iseq); const int arg_size = iseq->body->param.size; VALUE * const rsp = GET_SP() - calling->argc; - int opt_pc = vm_callee_setup_block_arg(th, calling, ci, iseq, rsp, is_lambda ? arg_setup_lambda : arg_setup_block); + int opt_pc = vm_callee_setup_block_arg(th, calling, ci, iseq, rsp, is_lambda ? arg_setup_method : arg_setup_block); SET_SP(rsp);