# HG changeset patch # User Windel Bouwman # Date 1376059039 -7200 # Node ID 9e235f15372b1563df501514fa89138dd822166a # Parent f8b5da5784b8272e61c85b5a385d3a42dc291631 Test diff -r f8b5da5784b8 -r 9e235f15372b python/ir/instruction.py --- a/python/ir/instruction.py Fri Aug 09 16:30:26 2013 +0200 +++ b/python/ir/instruction.py Fri Aug 09 16:37:19 2013 +0200 @@ -285,7 +285,7 @@ class ConditionalBranch(Terminator): - def __init__(self, a, cond, b, lab1, lab2): + def __init__(self, a, cond, b, lab1, lab2): super().__init__() self.a = a assert type(a) is Value @@ -300,12 +300,13 @@ assert type(lab2) is BasicBlock self.lab2 = lab2 - def __repr__(self): - return 'IF {0} {1} {2} THEN {3} ELSE {4}'.format(self.a, self.cond, self.b, self.lab1, self.lab2) - def getTargets(self): - return [self.lab1, self.lab2] + def __repr__(self): + return 'IF {0} {1} {2} THEN {3} ELSE {4}'.format(self.a, self.cond, self.b, self.lab1, self.lab2) - def changeTarget(self, tfrom, tto): + def getTargets(self): + return [self.lab1, self.lab2] + + def changeTarget(self, tfrom, tto): assert tfrom is self.lab1 or tfrom is self.lab2 if tfrom is self.lab1: self.lab1 = tto