From 6c1b1fa1f52f7c79b98a6b86f4f1f03f069dd36b Mon Sep 17 00:00:00 2001 From: Takashi Kokubun Date: Tue, 7 Feb 2023 00:17:13 -0800 Subject: Refactor BranchStub --- lib/ruby_vm/mjit/exit_compiler.rb | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'lib/ruby_vm/mjit/exit_compiler.rb') diff --git a/lib/ruby_vm/mjit/exit_compiler.rb b/lib/ruby_vm/mjit/exit_compiler.rb index f21ccced85..32ad59404f 100644 --- a/lib/ruby_vm/mjit/exit_compiler.rb +++ b/lib/ruby_vm/mjit/exit_compiler.rb @@ -75,13 +75,13 @@ module RubyVM::MJIT # @param ctx [RubyVM::MJIT::Context] # @param asm [RubyVM::MJIT::Assembler] # @param branch_stub [RubyVM::MJIT::BranchStub] - # @param branch_target_p [TrueClass,FalseClass] - def compile_branch_stub(jit, ctx, asm, branch_stub, branch_target_p) + # @param target0_p [TrueClass,FalseClass] + def compile_branch_stub(jit, ctx, asm, branch_stub, target0_p) # Call rb_mjit_branch_stub_hit - asm.comment("branch stub hit: #{branch_stub.iseq.body.location.label}@#{C.rb_iseq_path(branch_stub.iseq)}:#{iseq_lineno(branch_stub.iseq, branch_target_p ? branch_stub.branch_target_pc : branch_stub.fallthrough_pc)}") + asm.comment("branch stub hit: #{branch_stub.iseq.body.location.label}@#{C.rb_iseq_path(branch_stub.iseq)}:#{iseq_lineno(branch_stub.iseq, target0_p ? branch_stub.target0.pc : branch_stub.target1.pc)}") asm.mov(:rdi, to_value(branch_stub)) asm.mov(:esi, ctx.sp_offset) - asm.mov(:edx, branch_target_p ? 1 : 0) + asm.mov(:edx, target0_p ? 1 : 0) asm.call(C.rb_mjit_branch_stub_hit) # Jump to the address returned by rb_mjit_stub_hit -- cgit v1.2.3