diff options
author | Takashi Kokubun <[email protected]> | 2023-01-07 13:21:14 -0800 |
---|---|---|
committer | Takashi Kokubun <[email protected]> | 2023-03-05 22:11:20 -0800 |
commit | 62d36dd1277bdfeac609f89bc64589e8856421b8 (patch) | |
tree | 4c90de46486efd2c8912ef970449f4744630a5ba /lib/ruby_vm/mjit/code_block.rb | |
parent | eddec7bc209d721e99a8cd5ceaafd0f2ab270cc3 (diff) |
Implement branch stub
Diffstat (limited to 'lib/ruby_vm/mjit/code_block.rb')
-rw-r--r-- | lib/ruby_vm/mjit/code_block.rb | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/lib/ruby_vm/mjit/code_block.rb b/lib/ruby_vm/mjit/code_block.rb index 15589b91d0..21ae2386b7 100644 --- a/lib/ruby_vm/mjit/code_block.rb +++ b/lib/ruby_vm/mjit/code_block.rb @@ -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) |