Skip to content

Commit

Permalink
RJIT: Remove send_iseq_complex_splat exit
Browse files Browse the repository at this point in the history
  • Loading branch information
k0kubun committed Mar 25, 2023
1 parent 314c7dd commit 85a55d3
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 7 deletions.
9 changes: 4 additions & 5 deletions lib/ruby_vm/rjit/insn_compiler.rb
Expand Up @@ -4722,7 +4722,7 @@ def jit_callee_setup_arg(jit, ctx, asm, flags, argc, iseq)
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]
Expand Down Expand Up @@ -4763,7 +4763,7 @@ def jit_callee_setup_block_arg(jit, ctx, asm, calling, iseq, arg_setup_type:)
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]
Expand All @@ -4785,8 +4785,7 @@ def jit_setup_parameters_complex(jit, ctx, asm, flags, argc, iseq, arg_setup_typ
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)
Expand Down Expand Up @@ -4825,7 +4824,7 @@ def jit_setup_parameters_complex(jit, ctx, asm, flags, argc, iseq, arg_setup_typ
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

Expand Down
1 change: 0 additions & 1 deletion rjit_c.h
Expand Up @@ -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,
Expand Down
1 change: 0 additions & 1 deletion rjit_c.rb
Expand Up @@ -1311,7 +1311,6 @@ def C.rb_rjit_runtime_counters
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)")],
Expand Down

0 comments on commit 85a55d3

Please sign in to comment.