summaryrefslogtreecommitdiff
path: root/lib/ruby_vm/mjit/insn_compiler.rb
diff options
context:
space:
mode:
authorTakashi Kokubun <[email protected]>2023-02-07 11:55:07 -0800
committerTakashi Kokubun <[email protected]>2023-03-05 22:11:20 -0800
commitd415f1e3178625fa90ab908dcc5636b7e2e21c16 (patch)
treed33bd2749690ea9de132eac7a1a4e8c72e7c0e9c /lib/ruby_vm/mjit/insn_compiler.rb
parent47e2ea3a800dae6ac4d427ad9524a7d61dd992ee (diff)
Get rid of BlockStub
Diffstat (limited to 'lib/ruby_vm/mjit/insn_compiler.rb')
-rw-r--r--lib/ruby_vm/mjit/insn_compiler.rb19
1 files changed, 1 insertions, 18 deletions
diff --git a/lib/ruby_vm/mjit/insn_compiler.rb b/lib/ruby_vm/mjit/insn_compiler.rb
index 1d14fcb925..0ea0020f19 100644
--- a/lib/ruby_vm/mjit/insn_compiler.rb
+++ b/lib/ruby_vm/mjit/insn_compiler.rb
@@ -812,24 +812,7 @@ module RubyVM::MJIT
# @param asm [RubyVM::MJIT::Assembler]
def defer_compilation(jit, ctx, asm)
# Make a stub to compile the current insn
- compile_block_stub(jit.iseq, jit.pc, ctx, asm, comment: 'defer_compilation: block stub')
- end
-
- def compile_block_stub(iseq, pc, ctx, asm, comment: 'block stub')
- block_stub = BlockStub.new(iseq:, pc:, ctx: ctx.dup)
-
- stub_hit = Assembler.new.then do |ocb_asm|
- @exit_compiler.compile_block_stub(ctx, ocb_asm, block_stub)
- @ocb.write(ocb_asm)
- end
-
- block_stub.change_block = proc do |jump_asm, new_addr|
- jump_asm.comment(comment)
- jump_asm.stub(block_stub) do
- jump_asm.jmp(new_addr)
- end
- end
- block_stub.change_block.call(asm, stub_hit)
+ stub_next_block(jit.iseq, jit.pc, ctx, asm, comment: 'defer_compilation')
end
def stub_next_block(iseq, pc, ctx, asm, comment: 'stub_next_block')