diff options
author | Takashi Kokubun <takashikkbn@gmail.com> | 2023-04-02 12:28:49 -0700 |
---|---|---|
committer | Takashi Kokubun <takashikkbn@gmail.com> | 2023-04-02 12:28:49 -0700 |
commit | 284a0ff96c97be0c2413e3fb59a7874e4092c90b (patch) | |
tree | bbc341b1c572c02a06b0efe3e32eca756f5849b3 | |
parent | 3fe134759cc4904c74306e0832c22fa518a5bea2 (diff) | |
download | ruby-284a0ff96c97be0c2413e3fb59a7874e4092c90b.tar.gz |
RJIT: Remove an unneeded branch
-rw-r--r-- | lib/ruby_vm/rjit/insn_compiler.rb | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/lib/ruby_vm/rjit/insn_compiler.rb b/lib/ruby_vm/rjit/insn_compiler.rb index b486b5b3d4..b0244d800e 100644 --- a/lib/ruby_vm/rjit/insn_compiler.rb +++ b/lib/ruby_vm/rjit/insn_compiler.rb @@ -1359,14 +1359,14 @@ module RubyVM::RJIT cd = C.rb_call_data.new(jit.operand(0)) blockiseq = jit.operand(1) - block_handler = jit_caller_setup_arg_block(jit, ctx, asm, cd.ci, blockiseq, false) + block_handler = jit_caller_setup_arg_block(jit, ctx, asm, cd.ci, blockiseq) if block_handler == CantCompile return CantCompile end # calling->ci mid = C.vm_ci_mid(cd.ci) - calling = build_calling(ci: cd.ci, block_handler: blockiseq) + calling = build_calling(ci: cd.ci, block_handler:) # vm_sendish cme, comptime_recv_klass = jit_search_method(jit, ctx, asm, mid, calling) @@ -3918,7 +3918,7 @@ module RubyVM::RJIT # @param jit [RubyVM::RJIT::JITState] # @param ctx [RubyVM::RJIT::Context] # @param asm [RubyVM::RJIT::Assembler] - def jit_caller_setup_arg_block(jit, ctx, asm, ci, blockiseq, is_super) + def jit_caller_setup_arg_block(jit, ctx, asm, ci, blockiseq) side_exit = side_exit(jit, ctx) if C.vm_ci_flag(ci) & C::VM_CALL_ARGS_BLOCKARG != 0 # TODO: Skip cmp + jne using Context? @@ -3940,12 +3940,9 @@ module RubyVM::RJIT elsif blockiseq != 0 return blockiseq else - if is_super - else - # Not implemented yet. Is this even necessary? - asm.incr_counter(:send_block_setup) - return CantCompile - end + # Not implemented yet. Is this even necessary? + asm.incr_counter(:send_block_setup) + return CantCompile end end |