Redo compilation of all ISEQs after invalidation

This commit is contained in:
Takashi Kokubun 2023-02-10 14:41:45 -08:00
parent b379ccf755
commit 1bdc23f35b
5 changed files with 58 additions and 2 deletions

View file

@ -33,6 +33,12 @@ module RubyVM::MJIT
attr_accessor :write_pos
IseqBlocks = Hash.new { |h, k| h[k] = {} }
DeadBlocks = [] # invalidated IseqBlocks, but kept for safety
def self.reset_blocks
DeadBlocks << IseqBlocks.dup
IseqBlocks.clear
end
def self.decode_insn(encoded)
INSNS.fetch(C.rb_vm_insn_decode(encoded))