comparison python/ir/instruction.py @ 266:649884d9dc61 Working chain 1

Test
author Windel Bouwman
date Fri, 09 Aug 2013 16:49:29 +0200
parents 9e235f15372b
children 5ec7580976d9
comparison
equal deleted inserted replaced
265:9e235f15372b 266:649884d9dc61
305 305
306 def getTargets(self): 306 def getTargets(self):
307 return [self.lab1, self.lab2] 307 return [self.lab1, self.lab2]
308 308
309 def changeTarget(self, tfrom, tto): 309 def changeTarget(self, tfrom, tto):
310 assert tfrom is self.lab1 or tfrom is self.lab2 310 assert tfrom is self.lab1 or tfrom is self.lab2
311 if tfrom is self.lab1: 311 if tfrom is self.lab1:
312 self.lab1 = tto 312 self.lab1 = tto
313 elif tfrom is self.lab2: 313 elif tfrom is self.lab2:
314 self.lab2 = tto 314 self.lab2 = tto
315 315
316 316
317 class Return(Terminator): 317 class Return(Terminator):
318 def __init__(self, value=None): 318 def __init__(self, value=None):
319 super().__init__() 319 super().__init__()