mirror of
https://github.com/ruby/ruby.git
synced 2025-08-26 14:34:39 +02:00
Implement defer_compilation
This commit is contained in:
parent
2b8d1c93ea
commit
c3d99d0f12
10 changed files with 254 additions and 50 deletions
|
@ -37,6 +37,15 @@ module RubyVM::MJIT
|
|||
start_addr
|
||||
end
|
||||
|
||||
def with_addr(addr)
|
||||
old_write_pos = @write_pos
|
||||
@write_pos = addr - @mem_block
|
||||
@comments.delete(addr) # TODO: clean up old comments for all overwritten insns?
|
||||
yield
|
||||
ensure
|
||||
@write_pos = old_write_pos
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def write_addr
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue