work on branches
the concept is different in bosl, move appropriate to virtual
This commit is contained in:
@ -1,14 +0,0 @@
|
||||
module Virtual
|
||||
|
||||
|
||||
# a branch must branch to a block. This is an abstract class, names indicate the actual test
|
||||
class Branch < Instruction
|
||||
def initialize to
|
||||
@to = to
|
||||
end
|
||||
attr_reader :to
|
||||
end
|
||||
end
|
||||
|
||||
require_relative "is_true_branch"
|
||||
require_relative "unconditional_branch"
|
@ -1,8 +0,0 @@
|
||||
module Virtual
|
||||
|
||||
# implicit means there is no explcit test involved.
|
||||
# normal ruby rules are false and nil are false, EVERYTHING else is true (and that includes 0)
|
||||
class IsTrueBranch < Branch
|
||||
end
|
||||
|
||||
end
|
@ -1,6 +0,0 @@
|
||||
module Virtual
|
||||
|
||||
class UnconditionalBranch < Branch
|
||||
end
|
||||
|
||||
end
|
Reference in New Issue
Block a user