Mercurial > lcfOS
diff python/ir/instruction.py @ 209:07bfea4c1ed7
Added codegen test
author | Windel Bouwman |
---|---|
date | Sat, 29 Jun 2013 10:08:46 +0200 |
parents | d77cb5962cc5 |
children | 1fa3e0050b49 |
line wrap: on
line diff
--- a/python/ir/instruction.py Sat Jun 29 10:06:58 2013 +0200 +++ b/python/ir/instruction.py Sat Jun 29 10:08:46 2013 +0200 @@ -36,9 +36,9 @@ self.defs = [] self.uses = [] def delete(self): - for use in self.uses: - use.delete() - self.uses.clear() + while self.uses: + use = self.uses.pop() + use.delete() def addUse(self, val): self.uses.append(Use(self, val)) def addDef(self, v):