summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Kokubun <takashikkbn@gmail.com>2023-03-25 00:59:32 -0700
committerTakashi Kokubun <takashikkbn@gmail.com>2023-03-25 00:59:47 -0700
commit85a55d3e75fd98e7a0462ad289630d64ff31da84 (patch)
treeb848bf24ad7cd30d4f374d34e656b3aaffd07ca4
parent314c7dd6d1ef99c90b851fb5f5585ca449d3715a (diff)
downloadruby-85a55d3e75fd98e7a0462ad289630d64ff31da84.tar.gz
RJIT: Remove send_iseq_complex_splat exit
-rw-r--r--lib/ruby_vm/rjit/insn_compiler.rb9
-rw-r--r--rjit_c.h1
-rw-r--r--rjit_c.rb1
3 files changed, 4 insertions, 7 deletions
diff --git a/lib/ruby_vm/rjit/insn_compiler.rb b/lib/ruby_vm/rjit/insn_compiler.rb
index f49620c23d..5fb2a5fa7a 100644
--- a/lib/ruby_vm/rjit/insn_compiler.rb
+++ b/lib/ruby_vm/rjit/insn_compiler.rb
@@ -4722,7 +4722,7 @@ module RubyVM::RJIT
return jit_setup_parameters_complex(jit, ctx, asm, flags, argc, iseq)
end
- # vm_callee_setup_block_arg: Set up args and return opt_pc (or CantCompile)
+ # vm_callee_setup_block_arg (ISEQ only): Set up args and return opt_pc (or CantCompile)
# @param jit [RubyVM::RJIT::JITState]
# @param ctx [RubyVM::RJIT::Context]
# @param asm [RubyVM::RJIT::Assembler]
@@ -4763,7 +4763,7 @@ module RubyVM::RJIT
end
end
- # setup_parameters_complex
+ # setup_parameters_complex (ISEQ only)
# @param jit [RubyVM::RJIT::JITState]
# @param ctx [RubyVM::RJIT::Context]
# @param asm [RubyVM::RJIT::Assembler]
@@ -4785,8 +4785,7 @@ module RubyVM::RJIT
asm.incr_counter(:send_iseq_complex_kw_splat)
return CantCompile
elsif flags & C::VM_CALL_ARGS_SPLAT != 0
- asm.incr_counter(:send_iseq_complex_splat)
- return CantCompile
+ # Lazily handle splat in jit_call_iseq_setup_normal
else
if argc > 0 && kw_flag & C::VM_CALL_KW_SPLAT != 0
asm.incr_counter(:send_iseq_complex_kw_splat)
@@ -4825,7 +4824,7 @@ module RubyVM::RJIT
end
if iseq.body.param.flags.has_rest || iseq.body.param.flags.has_post
- asm.incr_counter(iseq.body.param.flags.has_rest ? :send_iseq_complex_has_rest : :send_iseq_complex_has_pos)
+ asm.incr_counter(iseq.body.param.flags.has_rest ? :send_iseq_complex_has_rest : :send_iseq_complex_has_post)
return CantCompile
end
diff --git a/rjit_c.h b/rjit_c.h
index 619a6e05dc..eaa455d4da 100644
--- a/rjit_c.h
+++ b/rjit_c.h
@@ -59,7 +59,6 @@ RJIT_RUNTIME_COUNTERS(
send_iseq_kwparam,
send_iseq_complex_kwarg,
send_iseq_complex_kw_splat,
- send_iseq_complex_splat,
send_iseq_complex_accepts_no_kwarg,
send_iseq_complex_arg_setup_block,
send_iseq_complex_arity,
diff --git a/rjit_c.rb b/rjit_c.rb
index 271e614de1..65a4b3e899 100644
--- a/rjit_c.rb
+++ b/rjit_c.rb
@@ -1311,7 +1311,6 @@ module RubyVM::RJIT # :nodoc: all
send_iseq_kwparam: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_rjit_runtime_counters *)NULL)), send_iseq_kwparam)")],
send_iseq_complex_kwarg: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_rjit_runtime_counters *)NULL)), send_iseq_complex_kwarg)")],
send_iseq_complex_kw_splat: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_rjit_runtime_counters *)NULL)), send_iseq_complex_kw_splat)")],
- send_iseq_complex_splat: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_rjit_runtime_counters *)NULL)), send_iseq_complex_splat)")],
send_iseq_complex_accepts_no_kwarg: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_rjit_runtime_counters *)NULL)), send_iseq_complex_accepts_no_kwarg)")],
send_iseq_complex_arg_setup_block: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_rjit_runtime_counters *)NULL)), send_iseq_complex_arg_setup_block)")],
send_iseq_complex_arity: [CType::Immediate.parse("size_t"), Primitive.cexpr!("OFFSETOF((*((struct rb_rjit_runtime_counters *)NULL)), send_iseq_complex_arity)")],