diff options
author | Alan Wu <XrXr@users.noreply.github.com> | 2021-10-27 16:10:25 -0400 |
---|---|---|
committer | Alan Wu <XrXr@users.noreply.github.com> | 2021-10-28 13:43:02 -0400 |
commit | e53d07f583866e6df7a88963ada33cad68018ebd (patch) | |
tree | c65d78bdc6475760a11c1447c462a67b5b689a06 /yjit.rb | |
parent | d8e97169baf3073366f768a52956c43a1d4b0806 (diff) | |
download | ruby-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.rb | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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" |