Skip to content

Commit 284a0ff

Browse files
committed
RJIT: Remove an unneeded branch
1 parent 3fe1347 commit 284a0ff

File tree

1 file changed

+6
-9
lines changed

1 file changed

+6
-9
lines changed

lib/ruby_vm/rjit/insn_compiler.rb

Lines changed: 6 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1359,14 +1359,14 @@ def send(jit, ctx, asm)
13591359
cd = C.rb_call_data.new(jit.operand(0))
13601360
blockiseq = jit.operand(1)
13611361

1362-
block_handler = jit_caller_setup_arg_block(jit, ctx, asm, cd.ci, blockiseq, false)
1362+
block_handler = jit_caller_setup_arg_block(jit, ctx, asm, cd.ci, blockiseq)
13631363
if block_handler == CantCompile
13641364
return CantCompile
13651365
end
13661366

13671367
# calling->ci
13681368
mid = C.vm_ci_mid(cd.ci)
1369-
calling = build_calling(ci: cd.ci, block_handler: blockiseq)
1369+
calling = build_calling(ci: cd.ci, block_handler:)
13701370

13711371
# vm_sendish
13721372
cme, comptime_recv_klass = jit_search_method(jit, ctx, asm, mid, calling)
@@ -3918,7 +3918,7 @@ def jit_write_iv(asm, comptime_receiver, recv_reg, temp_reg, ivar_index, set_val
39183918
# @param jit [RubyVM::RJIT::JITState]
39193919
# @param ctx [RubyVM::RJIT::Context]
39203920
# @param asm [RubyVM::RJIT::Assembler]
3921-
def jit_caller_setup_arg_block(jit, ctx, asm, ci, blockiseq, is_super)
3921+
def jit_caller_setup_arg_block(jit, ctx, asm, ci, blockiseq)
39223922
side_exit = side_exit(jit, ctx)
39233923
if C.vm_ci_flag(ci) & C::VM_CALL_ARGS_BLOCKARG != 0
39243924
# TODO: Skip cmp + jne using Context?
@@ -3940,12 +3940,9 @@ def jit_caller_setup_arg_block(jit, ctx, asm, ci, blockiseq, is_super)
39403940
elsif blockiseq != 0
39413941
return blockiseq
39423942
else
3943-
if is_super
3944-
else
3945-
# Not implemented yet. Is this even necessary?
3946-
asm.incr_counter(:send_block_setup)
3947-
return CantCompile
3948-
end
3943+
# Not implemented yet. Is this even necessary?
3944+
asm.incr_counter(:send_block_setup)
3945+
return CantCompile
39493946
end
39503947
end
39513948

0 commit comments

Comments
 (0)