summaryrefslogtreecommitdiff
path: root/lib/ruby_vm/rjit/compiler.rb
diff options
context:
space:
mode:
authorTakashi Kokubun <[email protected]>2023-04-01 21:23:36 -0700
committerTakashi Kokubun <[email protected]>2023-04-01 21:30:42 -0700
commite45ed2da5046f7ee2a82f332d211ddbd7108fc22 ()
treee65ce9898be564eb21f234351b7c4b77f283b266 /lib/ruby_vm/rjit/compiler.rb
parent90cdc5b8ba5421bfd183c2bfba16c1fd3ca7e0f5 (diff)
RJIT: Rewind stack_size on CantCompile and side exits
so that we can take an exit whenever we want. As a starter, this commit also pops blockarg earlier than some CantCompile exits.
-rw-r--r--lib/ruby_vm/rjit/compiler.rb6
1 files changed, 5 insertions, 1 deletions
@@ -220,6 +220,8 @@ module RubyVM::RJIT
while index < iseq.body.iseq_size
insn = self.class.decode_insn(iseq.body.iseq_encoded[index])
jit.pc = (iseq.body.iseq_encoded + index).to_i
# If previous instruction requested to record the boundary
if jit.record_boundary__point
@@ -243,7 +245,9 @@ module RubyVM::RJIT
# TODO: pad nops if entry exit exists (not needed for x86_64?)
break
when CantCompile
- @exit_compiler.compile_side_exit(jit.pc, ctx, asm)
# If this is the first instruction, this block never needs to be invalidated.
if block.pc == iseq.body.iseq_encoded.to_i + index * C.VALUE.size