mirror of
https://github.com/ruby/ruby.git
synced 2025-08-27 15:06:10 +02:00
Rename InsnCompiler to Codegen
because I'm not gonna limit this to insns anymore.
This commit is contained in:
parent
b99d62bf92
commit
bee5af407d
2 changed files with 5 additions and 5 deletions
|
@ -3,7 +3,7 @@ module RubyVM::MJIT
|
||||||
# cfp: rsi
|
# cfp: rsi
|
||||||
# sp: rbx
|
# sp: rbx
|
||||||
# scratch regs: rax
|
# scratch regs: rax
|
||||||
class InsnCompiler
|
class Codegen
|
||||||
def putnil(asm)
|
def putnil(asm)
|
||||||
asm.mov([:rbx], Qnil)
|
asm.mov([:rbx], Qnil)
|
||||||
KeepCompiling
|
KeepCompiling
|
|
@ -1,4 +1,4 @@
|
||||||
require 'mjit/insn_compiler'
|
require 'mjit/codegen'
|
||||||
require 'mjit/instruction'
|
require 'mjit/instruction'
|
||||||
require 'mjit/x86_assembler'
|
require 'mjit/x86_assembler'
|
||||||
|
|
||||||
|
@ -19,7 +19,7 @@ module RubyVM::MJIT
|
||||||
def initialize(mem_block)
|
def initialize(mem_block)
|
||||||
@mem_block = mem_block
|
@mem_block = mem_block
|
||||||
@write_pos = 0
|
@write_pos = 0
|
||||||
@insn_compiler = InsnCompiler.new
|
@codegen = Codegen.new
|
||||||
end
|
end
|
||||||
|
|
||||||
# @param iseq [RubyVM::MJIT::CPointer::Struct]
|
# @param iseq [RubyVM::MJIT::CPointer::Struct]
|
||||||
|
@ -77,8 +77,8 @@ module RubyVM::MJIT
|
||||||
|
|
||||||
def compile_insn(asm, insn)
|
def compile_insn(asm, insn)
|
||||||
case insn.name
|
case insn.name
|
||||||
when :putnil then @insn_compiler.putnil(asm)
|
when :putnil then @codegen.putnil(asm)
|
||||||
#when :leave then @insn_compiler.leave(asm)
|
#when :leave then @codegen.leave(asm)
|
||||||
else CantCompile
|
else CantCompile
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue