Implement branch stub

This commit is contained in:
Takashi Kokubun 2023-01-07 13:21:14 -08:00
parent eddec7bc20
commit 62d36dd127
10 changed files with 256 additions and 41 deletions

View file

@ -44,7 +44,7 @@ module RubyVM::MJIT
def with_write_addr(addr)
old_write_pos = @write_pos
set_addr(addr)
set_write_addr(addr)
yield
ensure
@write_pos = old_write_pos
@ -54,6 +54,10 @@ module RubyVM::MJIT
@mem_block + @write_pos
end
def include?(addr)
(@mem_block...(@mem_block + @mem_size)).include?(addr)
end
private
def dump_disasm(from, to)