2.1 --- a/simplify.py Sat Jul 15 19:54:55 2006 +0200
2.2 +++ b/simplify.py Sat Jul 15 20:40:32 2006 +0200
2.3 @@ -218,11 +218,11 @@
2.4 expr = self.dispatch(node)
2.5 method_name = self.comparison_methods[op_name]
2.6 if method_name:
2.7 - invocation = Invoke(expr=LoadAttr(expr=previous, name=method_name), params=[expr], star=None, dstar=None)
2.8 + invocation = Invoke(expr=LoadAttr(expr=previous, name=method_name), args=[expr], star=None, dstar=None)
2.9 elif op_name == "is":
2.10 - invocation = Invoke(expr=LoadName(name="__is__"), params=[previous, expr], star=None, dstar=None)
2.11 + invocation = Invoke(expr=LoadName(name="__is__"), args=[previous, expr], star=None, dstar=None)
2.12 elif op_name == "is not":
2.13 - invocation = Not(expr=Invoke(expr=LoadName(name="__is__"), params=[previous, expr], star=None, dstar=None))
2.14 + invocation = Not(expr=Invoke(expr=LoadName(name="__is__"), args=[previous, expr], star=None, dstar=None))
2.15 else:
2.16 raise NotImplementedError, op_name
2.17 nodes.append(StoreTemp(expr=invocation))
2.18 @@ -231,6 +231,7 @@
2.19 nodes.append(ReleaseTemp())
2.20 else:
2.21 nodes.append(Return(expr=LoadTemp()))
2.22 + previous = expr
2.23 subprogram.code = nodes
2.24
2.25 self.current_subprograms.pop()
2.26 @@ -259,7 +260,7 @@
2.27 expr = self.dispatch(node)
2.28 if node is not last:
2.29 nodes.append(StoreTemp(expr=expr))
2.30 - invocation = Invoke(expr=LoadAttr(expr=LoadTemp(), name="__true__"), params=[], star=None, dstar=None)
2.31 + invocation = Invoke(expr=LoadAttr(expr=LoadTemp(), name="__true__"), args=[], star=None, dstar=None)
2.32 nodes.append(Conditional(test=Not(expr=invocation), body=[Return(expr=LoadTemp())]))
2.33 nodes.append(ReleaseTemp())
2.34 else:
2.35 @@ -292,8 +293,7 @@
2.36 expr = self.dispatch(node)
2.37 if node is not last:
2.38 nodes.append(StoreTemp(expr=expr))
2.39 - invocation = Invoke(expr=LoadAttr(expr=LoadTemp(), name="__true__"),
2.40 - params=[], star=None, dstar=None)
2.41 + invocation = Invoke(expr=LoadAttr(expr=LoadTemp(), name="__true__"), args=[], star=None, dstar=None)
2.42 nodes.append(Conditional(test=invocation, body=[Return(expr=LoadTemp())]))
2.43 nodes.append(ReleaseTemp())
2.44 else:
2.45 @@ -311,7 +311,7 @@
2.46
2.47 def visitNot(self, not_):
2.48 result = Not(not_, expr=Invoke(expr=LoadAttr(expr=self.dispatch(not_.expr), name="__true__"),
2.49 - params=[], star=None, dstar=None))
2.50 + args=[], star=None, dstar=None))
2.51 return result
2.52
2.53 # Operators.