diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2023-04-01 21:47:28 -0700 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2023-04-01 21:47:28 -0700 |
commit | bf2617b8a679b5ef7eabfa3feb2ef2686d1291f0 (patch) | |
tree | 9b2915da6e13d7ea7de7b71f4f40791afdf640a4 /lib/ruby_vm | |
parent | ee52255f93b30c15031d2a6566fbe68c2b9a16c7 (diff) | |
download | ruby-bf2617b8a679b5ef7eabfa3feb2ef2686d1291f0.tar.gz |
RJIT: Fix has_rest exit conditions
Diffstat (limited to 'lib/ruby_vm')
-rw-r--r-- | lib/ruby_vm/rjit/insn_compiler.rb | 14 |
1 files changed, 7 insertions, 7 deletions
diff --git a/lib/ruby_vm/rjit/insn_compiler.rb b/lib/ruby_vm/rjit/insn_compiler.rb index ab38000f18..f7a088fe74 100644 --- a/lib/ruby_vm/rjit/insn_compiler.rb +++ b/lib/ruby_vm/rjit/insn_compiler.rb @@ -4130,8 +4130,8 @@ module RubyVM::RJIT return CantCompile end - if iseq_has_rest && iseq.body.param.flags.has_kw - asm.incr_counter(:send_iseq_has_rest_and_kw) + if iseq_has_rest && iseq.body.param.flags.has_kw && supplying_kws + asm.incr_counter(:send_iseq_has_rest_and_kw_supplied) return CantCompile end @@ -4286,6 +4286,11 @@ module RubyVM::RJIT jit_call_opt_send_shift_stack(ctx, asm, argc, send_shift:) end + if iseq_has_rest + asm.incr_counter(:send_iseq_has_rest) + return CantCompile + end + if doing_kw_call asm.incr_counter(:send_iseq_kw_call) return CantCompile @@ -4301,11 +4306,6 @@ module RubyVM::RJIT return CantCompile end - if iseq_has_rest - asm.incr_counter(:send_iseq_has_rest) - return CantCompile - end - # Setup the new frame frame_type ||= C::VM_FRAME_MAGIC_METHOD | C::VM_ENV_FLAG_LOCAL jit_push_frame( |