summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTakashi Kokubun <[email protected]>2022-12-23 14:02:23 -0800
committerTakashi Kokubun <[email protected]>2023-03-05 22:11:20 -0800
commitbee5af407d194672d4971e70b0d232698c071f6d (patch)
tree523b292a46d750550776b34d2dc702c00c0f60b3
parentb99d62bf92b929858975dc7eb9c079b15ac84c9d (diff)
Rename InsnCompiler to Codegen
because I'm not gonna limit this to insns anymore.
-rw-r--r--lib/mjit/codegen.rb (renamed from lib/mjit/insn_compiler.rb)2
-rw-r--r--lib/ruby_vm/mjit/compiler.rb8
2 files changed, 5 insertions, 5 deletions
diff --git a/lib/mjit/insn_compiler.rb b/lib/mjit/codegen.rb
index dcca5d3720..139ead9e5c 100644
--- a/lib/mjit/insn_compiler.rb
+++ b/lib/mjit/codegen.rb
@@ -3,7 +3,7 @@ module RubyVM::MJIT
# cfp: rsi
# sp: rbx
# scratch regs: rax
- class InsnCompiler
+ class Codegen
def putnil(asm)
asm.mov([:rbx], Qnil)
KeepCompiling
diff --git a/lib/ruby_vm/mjit/compiler.rb b/lib/ruby_vm/mjit/compiler.rb
index 098e478835..67ece44624 100644
--- a/lib/ruby_vm/mjit/compiler.rb
+++ b/lib/ruby_vm/mjit/compiler.rb
@@ -1,4 +1,4 @@
-require 'mjit/insn_compiler'
+require 'mjit/codegen'
require 'mjit/instruction'
require 'mjit/x86_assembler'
@@ -19,7 +19,7 @@ module RubyVM::MJIT
def initialize(mem_block)
@mem_block = mem_block
@write_pos = 0
- @insn_compiler = InsnCompiler.new
+ @codegen = Codegen.new
end
# @param iseq [RubyVM::MJIT::CPointer::Struct]
@@ -77,8 +77,8 @@ module RubyVM::MJIT
def compile_insn(asm, insn)
case insn.name
- when :putnil then @insn_compiler.putnil(asm)
- #when :leave then @insn_compiler.leave(asm)
+ when :putnil then @codegen.putnil(asm)
+ #when :leave then @codegen.leave(asm)
else CantCompile
end
end