summaryrefslogtreecommitdiff
path: root/lib/ruby_vm/rjit/compiler.rb
diff options
context:
space:
mode:
-rw-r--r--lib/ruby_vm/rjit/compiler.rb31
1 files changed, 31 insertions, 0 deletions
@@ -34,6 +34,10 @@ module RubyVM::RJIT
# Mark objects in this Array during GC
GC_REFS = []
class Compiler
attr_accessor :write_pos
@@ -277,6 +281,7 @@ module RubyVM::RJIT
# @param asm [RubyVM::RJIT::Assembler]
def compile_block(asm, jit:, pc:, ctx: Context.new)
# Mark the block start address and prepare an exit code storage
block = Block.new(iseq: jit.iseq, pc:, ctx: ctx.dup)
jit.block = block
asm.block(block)
@@ -346,6 +351,32 @@ module RubyVM::RJIT
end
end
def list_blocks(iseq, pc)
rjit_blocks(iseq)[pc]
end