remove last block occurrences

fixed.
This commit is contained in:
Torsten Ruger
2015-10-25 12:03:31 +02:00
parent 471329917b
commit 0921073025
7 changed files with 26 additions and 16 deletions

View File

@ -45,6 +45,11 @@ module Register
self.next.assemble_all(io, labels) if self.next
end
def each_label labels =[] , &block
super
self.label.each_label(labels , &block) if self.label
end
end
class IsZero < Branch

View File

@ -56,5 +56,12 @@ module Register
self.position = position
self.next.set_position(position,labels)
end
def each_label labels =[] , &block
return if labels.include?(self)
labels << self
block.yield(self)
super
end
end
end