work on branches

the concept is different in bosl, move appropriate to virtual
This commit is contained in:
Torsten Ruger
2015-10-07 10:02:51 +03:00
parent 4e26166dff
commit f0611e52db
7 changed files with 17 additions and 35 deletions

View File

@ -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"

View File

@ -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

View File

@ -1,6 +0,0 @@
module Virtual
class UnconditionalBranch < Branch
end
end