rename jump label
This commit is contained in:
parent
d98e55907e
commit
b99fdc3425
@ -1,18 +1,18 @@
|
|||||||
module Mom
|
module Mom
|
||||||
|
|
||||||
# Unconditional jump to the Label given as target
|
# Unconditional jump to the Label given
|
||||||
# Eg used at the end of while or end of if_true branch
|
# Eg used at the end of while or end of if_true branch
|
||||||
#
|
#
|
||||||
# Risc equivalent is the same really, called Unconditional there.
|
# Risc equivalent is the same really, called Unconditional there.
|
||||||
#
|
#
|
||||||
class Jump < Instruction
|
class Jump < Instruction
|
||||||
attr_reader :target
|
attr_reader :label
|
||||||
|
|
||||||
def initialize(target)
|
def initialize(label)
|
||||||
@target = target
|
@label = label
|
||||||
end
|
end
|
||||||
def to_risc(compiler)
|
def to_risc(compiler)
|
||||||
Risc::Unconditional.new(self , @target.to_risc(compiler))
|
Risc::Unconditional.new(self , @label.to_risc(compiler))
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user