diff options
author | Takashi Kokubun <[email protected]> | 2023-02-18 14:45:17 -0800 |
---|---|---|
committer | Takashi Kokubun <[email protected]> | 2023-03-05 23:28:59 -0800 |
commit | feb60f6f5107561f2e83e3f53b1db52d2b201708 (patch) | |
tree | 1516b160b90070bed0c8a53248439690d688684e /lib/ruby_vm/mjit/hooks.rb | |
parent | 2cc4f506bac0748277b41a4a5eb6f0ec41dd7344 (diff) |
Invalidate blocks on constant IC updates
Notes
Notes:
Merged: https://github.com/ruby/ruby/pull/7448
Diffstat (limited to 'lib/ruby_vm/mjit/hooks.rb')
-rw-r--r-- | lib/ruby_vm/mjit/hooks.rb | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/lib/ruby_vm/mjit/hooks.rb b/lib/ruby_vm/mjit/hooks.rb index 39a949b4d7..f3943504fd 100644 --- a/lib/ruby_vm/mjit/hooks.rb +++ b/lib/ruby_vm/mjit/hooks.rb @@ -5,6 +5,7 @@ module RubyVM::MJIT end def self.on_cme_invalidate(cme) + cme = C.rb_callable_method_entry_struct.new(cme) Invariants.on_cme_invalidate(cme) end @@ -16,8 +17,10 @@ module RubyVM::MJIT # to be used later end - def self.on_constant_ic_update(_iseq, _ic, _insn_idx) - # to be used later + def self.on_constant_ic_update(iseq, ic, insn_idx) + iseq = C.rb_iseq_t.new(iseq) + ic = C.IC.new(ic) + Invariants.on_constant_ic_update(iseq, ic, insn_idx) end def self.on_tracing_invalidate_all(_new_iseq_events) |