summaryrefslogtreecommitdiff
path: root/lib/ruby_vm/mjit/compiler.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ruby_vm/mjit/compiler.rb')
-rw-r--r--lib/ruby_vm/mjit/compiler.rb6
1 files changed, 6 insertions, 0 deletions
diff --git a/lib/ruby_vm/mjit/compiler.rb b/lib/ruby_vm/mjit/compiler.rb
index 2ad01ef669..5aac3626fa 100644
--- a/lib/ruby_vm/mjit/compiler.rb
+++ b/lib/ruby_vm/mjit/compiler.rb
@@ -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))