while coded

This commit is contained in:
Torsten Ruger
2014-05-22 14:56:31 +03:00
parent ccf88319e0
commit 8596fb312d
3 changed files with 19 additions and 7 deletions

View File

@ -73,6 +73,17 @@ module Vm
block
end
# return a list of the blocks that are addressable, ie entry and @blocks and all next
def blocks
ret = []
(@blocks << @entry).each do |b|
while b
ret << b
b = b.next
end
end
ret
end
# following id the Code interface
# to link we link the entry and then any blocks. The entry links the straight line