aboutsummaryrefslogtreecommitdiffstats
path: root/yjit.rb
diff options
context:
space:
mode:
authorAlan Wu <XrXr@users.noreply.github.com>2021-10-27 16:10:25 -0400
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-28 13:43:02 -0400
commite53d07f583866e6df7a88963ada33cad68018ebd (patch)
treec65d78bdc6475760a11c1447c462a67b5b689a06 /yjit.rb
parentd8e97169baf3073366f768a52956c43a1d4b0806 (diff)
downloadruby-e53d07f583866e6df7a88963ada33cad68018ebd.tar.gz
Rename ::YJIT to RubyVM::YJIT
Since the YJIT Ruby module is CRuby specific and not meant for general use, it should live under RubyVM instead of at top level.
Diffstat (limited to 'yjit.rb')
-rw-r--r--yjit.rb8
1 files changed, 4 insertions, 4 deletions
diff --git a/yjit.rb b/yjit.rb
index 66c4eaf702..3592e20a7f 100644
--- a/yjit.rb
+++ b/yjit.rb
@@ -5,12 +5,12 @@
#
# This module is only defined when YJIT has support for the particular platform
# on which CRuby is built.
-module YJIT
+module RubyVM::YJIT
if defined?(Disasm)
def self.disasm(iseq, tty: $stdout && $stdout.tty?)
iseq = RubyVM::InstructionSequence.of(iseq)
- blocks = YJIT.blocks_for(iseq)
+ blocks = blocks_for(iseq)
return if blocks.empty?
str = String.new
@@ -28,7 +28,7 @@ module YJIT
end
}
- cs = YJIT::Disasm.new
+ cs = Disasm.new
sorted_blocks.each_with_index do |block, i|
str << "== BLOCK #{i+1}/#{blocks.length}: #{block.code.length} BYTES, ISEQ RANGE [#{block.iseq_start_index},#{block.iseq_end_index}) ".ljust(80, "=")
str << "\n"
@@ -65,7 +65,7 @@ module YJIT
def self.graphviz_for(iseq)
iseq = RubyVM::InstructionSequence.of(iseq)
- cs = YJIT::Disasm.new
+ cs = Disasm.new
highlight = ->(comment) { "<b>#{comment}</b>" }
linebreak = "<br align=\"left\"/>\n"