fix register shortcuts
This commit is contained in:
parent
96972dab29
commit
91a0365c2e
@ -16,9 +16,6 @@ module Register
|
||||
"LoadConstant: #{register} <- #{constant_str}"
|
||||
end
|
||||
|
||||
def self.load source , constant , register
|
||||
LoadConstant.new source , constant , register
|
||||
end
|
||||
private
|
||||
def constant_str
|
||||
case @constant
|
||||
@ -33,4 +30,7 @@ module Register
|
||||
end
|
||||
end
|
||||
end
|
||||
def self.load_constant source , constant , register
|
||||
LoadConstant.new source , constant , register
|
||||
end
|
||||
end
|
||||
|
@ -13,9 +13,9 @@ module Register
|
||||
"OperatorInstruction: #{left} #{operator} #{right}"
|
||||
end
|
||||
|
||||
end
|
||||
def self.op source , operator , left , right
|
||||
OperatorInstruction.new source , operator , left , right
|
||||
end
|
||||
end
|
||||
|
||||
end
|
||||
|
@ -28,9 +28,8 @@ module Register
|
||||
def to_s
|
||||
"RegisterTransfer: #{from} -> #{to}"
|
||||
end
|
||||
|
||||
end
|
||||
def self.transfer source , from , to
|
||||
RegisterTransfer.new source , from , to
|
||||
end
|
||||
end
|
||||
end
|
||||
|
Loading…
x
Reference in New Issue
Block a user