Move the Main instruction from register to virtual
also needs a branch in register. This way the register level is self sufficient (noticed while writing debugger)
This commit is contained in:
12
lib/register/instructions/branch.rb
Normal file
12
lib/register/instructions/branch.rb
Normal file
@ -0,0 +1,12 @@
|
||||
module Register
|
||||
|
||||
|
||||
# a branch must branch to a block.
|
||||
class Branch < Instruction
|
||||
def initialize to
|
||||
raise "No block" unless to
|
||||
@block = to
|
||||
end
|
||||
attr_reader :block
|
||||
end
|
||||
end
|
Reference in New Issue
Block a user