comparison python/ir/basicblock.py @ 252:c4370696ccc7

added optimize function
author Windel Bouwman
date Tue, 30 Jul 2013 17:57:46 +0200
parents ef683881c64e
children 04c19282a5aa
comparison
equal deleted inserted replaced
251:6ed3d3a82a63 252:c4370696ccc7
19 i2.parent = self 19 i2.parent = self
20 self.instructions[idx] = i2 20 self.instructions[idx] = i2
21 21
22 def removeInstruction(self, i): 22 def removeInstruction(self, i):
23 i.parent = None 23 i.parent = None
24 i.delete()
24 self.instructions.remove(i) 25 self.instructions.remove(i)
25 26
26 def getInstructions(self): 27 def getInstructions(self):
27 return self.instructions 28 return self.instructions
28 Instructions = property(getInstructions) 29 Instructions = property(getInstructions)