-
Notifications
You must be signed in to change notification settings - Fork 5.3k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
8 changed files
with
143 additions
and
78 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,32 +1,27 @@ | ||
module RubyVM::MJIT::Hooks # :nodoc: all | ||
C = RubyVM::MJIT.const_get(:C, false) | ||
module RubyVM::MJIT | ||
module Hooks # :nodoc: all | ||
def self.on_bop_redefined(_redefined_flag, _bop) | ||
# C.mjit_cancel_all("BOP is redefined") | ||
end | ||
|
||
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_cme_invalidate(cme) | ||
Invariants.on_cme_invalidate(cme) | ||
end | ||
|
||
def self.on_ractor_spawn | ||
# C.mjit_cancel_all("Ractor is spawned") | ||
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_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_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 | ||
def self.on_tracing_invalidate_all(_new_iseq_events) | ||
Invariants.on_tracing_invalidate_all | ||
end | ||
end | ||
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters