diff options
author | Takashi Kokubun <[email protected]> | 2023-02-03 22:42:13 -0800 |
---|---|---|
committer | Takashi Kokubun <[email protected]> | 2023-03-05 22:11:20 -0800 |
commit | e731ced2717ed151369b2d6635452ffdf0c96e43 (patch) | |
tree | 7de0efd0c4a1c90a9f59479c9094ea9c070cf44f /lib/ruby_vm/mjit/hooks.rb | |
parent | fa0b9c1c97ba1ab03e2675ce96bceda9ef046127 (diff) |
Implement method call
Diffstat (limited to 'lib/ruby_vm/mjit/hooks.rb')
-rw-r--r-- | lib/ruby_vm/mjit/hooks.rb | 32 |
1 files changed, 32 insertions, 0 deletions
diff --git a/lib/ruby_vm/mjit/hooks.rb b/lib/ruby_vm/mjit/hooks.rb new file mode 100644 index 0000000000..6aef14b56a --- /dev/null +++ b/lib/ruby_vm/mjit/hooks.rb @@ -0,0 +1,32 @@ +module RubyVM::MJIT::Hooks # :nodoc: all + C = RubyVM::MJIT.const_get(:C, false) + + def self.on_bop_redefined(_redefined_flag, _bop) + # C.mjit_cancel_all("BOP is redefined") + end + + def self.on_cme_invalidate(_cme) + # to be used later + end + + def self.on_ractor_spawn + # C.mjit_cancel_all("Ractor is spawned") + end + + def self.on_constant_state_changed(_id) + # to be used later + end + + def self.on_constant_ic_update(_iseq, _ic, _insn_idx) + # to be used later + end + + def self.on_tracing_invalidate_all(new_iseq_events) + # # Stop calling all JIT-ed code. We can't rewrite existing JIT-ed code to trace_ insns for now. + # # :class events are triggered only in ISEQ_TYPE_CLASS, but mjit_target_iseq_p ignores such iseqs. + # # Thus we don't need to cancel JIT-ed code for :class events. + # if new_iseq_events != C.RUBY_EVENT_CLASS + # C.mjit_cancel_all("TracePoint is enabled") + # end + end +end |