remove last block occurrences
fixed.
This commit is contained in:
@ -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
|
||||
|
@ -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
|
||||
|
Reference in New Issue
Block a user