summaryrefslogtreecommitdiff
path: root/tool/ruby_vm
diff options
context:
space:
mode:
authorJose Narvaez <goyox86@gmail.com>2021-03-06 23:46:56 +0000
committerAlan Wu <XrXr@users.noreply.github.com>2021-10-20 18:19:31 -0400
commit4e2eb7695e9b45cb5d2ae757bdb5c2043d78be78 (patch)
tree71e02cd04b191b9ce66801b67736cf69d831bd0b /tool/ruby_vm
parent7f7e79d80221949f93c7ded7cbd8d26afd3dea1d (diff)
downloadruby-4e2eb7695e9b45cb5d2ae757bdb5c2043d78be78.tar.gz
Yet Another Ruby JIT!
Renaming uJIT to YJIT. AKA s/ujit/yjit/g.
Diffstat (limited to 'tool/ruby_vm')
-rw-r--r--tool/ruby_vm/models/micro_jit.rb6
-rw-r--r--tool/ruby_vm/models/micro_jit/example_instructions.rb2
-rw-r--r--tool/ruby_vm/views/vm.inc.erb8
-rw-r--r--tool/ruby_vm/views/yjit_hooks.inc.erb (renamed from tool/ruby_vm/views/ujit_hooks.inc.erb)2
4 files changed, 9 insertions, 9 deletions
diff --git a/tool/ruby_vm/models/micro_jit.rb b/tool/ruby_vm/models/micro_jit.rb
index 5e376ebb3a..83b463a367 100644
--- a/tool/ruby_vm/models/micro_jit.rb
+++ b/tool/ruby_vm/models/micro_jit.rb
@@ -179,7 +179,7 @@ module RubyVM::MicroJIT
def make_result(success, with_pc)
[success ? 1 : 0,
[
- ['ujit_with_ec', with_pc],
+ ['yjit_with_ec', with_pc],
]
]
end
@@ -197,7 +197,7 @@ module RubyVM::MicroJIT
end
def scrape
- with_ec = scrape_instruction(RubyVM::Instructions.find_index { |insn| insn.name == 'ujit_call_example_with_ec' })
+ with_ec = scrape_instruction(RubyVM::Instructions.find_index { |insn| insn.name == 'yjit_call_example_with_ec' })
make_result(true, with_ec)
rescue => e
print_warning("scrape failed: #{e.message}")
@@ -207,7 +207,7 @@ module RubyVM::MicroJIT
end
def print_warning(text)
- text = "ujit warning: #{text}"
+ text = "yjit warning: #{text}"
text = "\x1b[1m#{text}\x1b[0m" if STDOUT.tty?
STDOUT.puts(text)
end
diff --git a/tool/ruby_vm/models/micro_jit/example_instructions.rb b/tool/ruby_vm/models/micro_jit/example_instructions.rb
index 23ecf72a3b..5dd40fef65 100644
--- a/tool/ruby_vm/models/micro_jit/example_instructions.rb
+++ b/tool/ruby_vm/models/micro_jit/example_instructions.rb
@@ -64,6 +64,6 @@ class RubyVM::MicroJIT::ExampleInstructions
end
def self.to_a
- [new('ujit_call_example_with_ec')]
+ [new('yjit_call_example_with_ec')]
end
end
diff --git a/tool/ruby_vm/views/vm.inc.erb b/tool/ruby_vm/views/vm.inc.erb
index 57a860efcf..c49c785df6 100644
--- a/tool/ruby_vm/views/vm.inc.erb
+++ b/tool/ruby_vm/views/vm.inc.erb
@@ -26,16 +26,16 @@
% end
%
% RubyVM::MicroJIT::ExampleInstructions.to_a.each do |insn|
-INSN_ENTRY(ujit_call_example_with_ec)
+INSN_ENTRY(yjit_call_example_with_ec)
{
- START_OF_ORIGINAL_INSN(ujit_call_example_with_ec);
+ START_OF_ORIGINAL_INSN(yjit_call_example_with_ec);
#if USE_MACHINE_REGS
// assumes USE_MACHINE_REGS, aka reg_pc setup,
// aka #define SET_PC(x) (reg_cfp->pc = reg_pc = (x))
- rb_ujit_empty_func_with_ec(GET_CFP(), ec);
+ rb_yjit_empty_func_with_ec(GET_CFP(), ec);
RESTORE_REGS();
#endif
- END_INSN(ujit_call_example_with_ec);
+ END_INSN(yjit_call_example_with_ec);
}
% end
%
diff --git a/tool/ruby_vm/views/ujit_hooks.inc.erb b/tool/ruby_vm/views/yjit_hooks.inc.erb
index 9409c996b1..faca2050c6 100644
--- a/tool/ruby_vm/views/ujit_hooks.inc.erb
+++ b/tool/ruby_vm/views/yjit_hooks.inc.erb
@@ -13,7 +13,7 @@
} -%>
% success, byte_arrays = RubyVM::MicroJIT.scrape
-static const uint8_t ujit_scrape_successful = <%= success %>;
+static const uint8_t yjit_scrape_successful = <%= success %>;
% byte_arrays.each do |(prefix, scrape_result)|
// Disassembly:
% scrape_result.disassembly_lines.each do |line|