21 lines
417 B
Ruby
Raw Normal View History

2017-08-30 17:21:13 +03:00
module Mom
# Unconditional jump to the Label given as target
# Eg used at the end of while or end of if_true branch
#
# Risc equivalent is the same really, called Unconditional there.
2018-03-14 20:25:21 +05:30
#
2017-08-30 17:21:13 +03:00
class Jump < Instruction
attr_reader :target
def initialize(target)
@target = target
end
def to_risc(compiler)
Risc::Unconditional.new(self , @target.to_risc(compiler))
2018-03-14 20:25:21 +05:30
end
2017-08-30 17:21:13 +03:00
end
end