aboutsummaryrefslogtreecommitdiffstats
path: root/lib/ruby_vm/mjit/invariants.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/ruby_vm/mjit/invariants.rb')
-rw-r--r--lib/ruby_vm/mjit/invariants.rb7
1 files changed, 3 insertions, 4 deletions
diff --git a/lib/ruby_vm/mjit/invariants.rb b/lib/ruby_vm/mjit/invariants.rb
index 0e8063c0c6..21f70d00a2 100644
--- a/lib/ruby_vm/mjit/invariants.rb
+++ b/lib/ruby_vm/mjit/invariants.rb
@@ -112,12 +112,11 @@ module RubyVM::MJIT
end
@patches.clear
- # Avoid reusing past code
- Compiler.reset_blocks
-
C.mjit_for_each_iseq do |iseq|
- # Disable entering past code
+ # Avoid entering past code
iseq.body.jit_func = 0
+ # Avoid reusing past code
+ iseq.body.mjit_blocks.clear if iseq.body.mjit_blocks
# Compile this again if not converted to trace_* insns
iseq.body.total_calls = 0
end