ruby-changes:65946
From: Alan <ko1@a...>
Date: Sat, 24 Apr 2021 08:37:16 +0900 (JST)
Subject: [ruby-changes:65946] a224ce8150 (master): Remove unnecessary checks for empty kw splat
https://git.ruby-lang.org/ruby.git/commit/?id=a224ce8150 From a224ce8150f2bc687cf79eb415c931d87a4cd247 Mon Sep 17 00:00:00 2001 From: Alan Wu <XrXr@u...> Date: Fri, 23 Apr 2021 19:37:03 -0400 Subject: Remove unnecessary checks for empty kw splat These two checks are surrounded by an if that ensures the call site is not a kw splat call site. --- vm_insnhelper.c | 2 -- 1 file changed, 2 deletions(-) diff --git a/vm_insnhelper.c b/vm_insnhelper.c index 854b8a9..be09fb3 100644 --- a/vm_insnhelper.c +++ b/vm_insnhelper.c @@ -2417,7 +2417,6 @@ vm_callee_setup_arg(rb_execution_context_t *ec, struct rb_calling_info *calling, https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L2417 if (LIKELY(rb_simple_iseq_p(iseq))) { rb_control_frame_t *cfp = ec->cfp; CALLER_SETUP_ARG(cfp, calling, ci); - CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci); if (calling->argc != iseq->body->param.lead_num) { argument_arity_error(ec, iseq, calling->argc, iseq->body->param.lead_num, iseq->body->param.lead_num); @@ -2431,7 +2430,6 @@ vm_callee_setup_arg(rb_execution_context_t *ec, struct rb_calling_info *calling, https://github.com/ruby/ruby/blob/trunk/vm_insnhelper.c#L2430 else if (rb_iseq_only_optparam_p(iseq)) { rb_control_frame_t *cfp = ec->cfp; CALLER_SETUP_ARG(cfp, calling, ci); - CALLER_REMOVE_EMPTY_KW_SPLAT(cfp, calling, ci); const int lead_num = iseq->body->param.lead_num; const int opt_num = iseq->body->param.opt_num; -- cgit v1.1 -- ML: ruby-changes@q... Info: http://www.atdot.net/~ko1/quickml/