1.1 --- a/simplify.py Sat Jul 15 19:54:55 2006 +0200
1.2 +++ b/simplify.py Sat Jul 15 20:40:32 2006 +0200
1.3 @@ -218,11 +218,11 @@
1.4 expr = self.dispatch(node)
1.5 method_name = self.comparison_methods[op_name]
1.6 if method_name:
1.7 - invocation = Invoke(expr=LoadAttr(expr=previous, name=method_name), params=[expr], star=None, dstar=None)
1.8 + invocation = Invoke(expr=LoadAttr(expr=previous, name=method_name), args=[expr], star=None, dstar=None)
1.9 elif op_name == "is":
1.10 - invocation = Invoke(expr=LoadName(name="__is__"), params=[previous, expr], star=None, dstar=None)
1.11 + invocation = Invoke(expr=LoadName(name="__is__"), args=[previous, expr], star=None, dstar=None)
1.12 elif op_name == "is not":
1.13 - invocation = Not(expr=Invoke(expr=LoadName(name="__is__"), params=[previous, expr], star=None, dstar=None))
1.14 + invocation = Not(expr=Invoke(expr=LoadName(name="__is__"), args=[previous, expr], star=None, dstar=None))
1.15 else:
1.16 raise NotImplementedError, op_name
1.17 nodes.append(StoreTemp(expr=invocation))
1.18 @@ -231,6 +231,7 @@
1.19 nodes.append(ReleaseTemp())
1.20 else:
1.21 nodes.append(Return(expr=LoadTemp()))
1.22 + previous = expr
1.23 subprogram.code = nodes
1.24
1.25 self.current_subprograms.pop()
1.26 @@ -259,7 +260,7 @@
1.27 expr = self.dispatch(node)
1.28 if node is not last:
1.29 nodes.append(StoreTemp(expr=expr))
1.30 - invocation = Invoke(expr=LoadAttr(expr=LoadTemp(), name="__true__"), params=[], star=None, dstar=None)
1.31 + invocation = Invoke(expr=LoadAttr(expr=LoadTemp(), name="__true__"), args=[], star=None, dstar=None)
1.32 nodes.append(Conditional(test=Not(expr=invocation), body=[Return(expr=LoadTemp())]))
1.33 nodes.append(ReleaseTemp())
1.34 else:
1.35 @@ -292,8 +293,7 @@
1.36 expr = self.dispatch(node)
1.37 if node is not last:
1.38 nodes.append(StoreTemp(expr=expr))
1.39 - invocation = Invoke(expr=LoadAttr(expr=LoadTemp(), name="__true__"),
1.40 - params=[], star=None, dstar=None)
1.41 + invocation = Invoke(expr=LoadAttr(expr=LoadTemp(), name="__true__"), args=[], star=None, dstar=None)
1.42 nodes.append(Conditional(test=invocation, body=[Return(expr=LoadTemp())]))
1.43 nodes.append(ReleaseTemp())
1.44 else:
1.45 @@ -311,7 +311,7 @@
1.46
1.47 def visitNot(self, not_):
1.48 result = Not(not_, expr=Invoke(expr=LoadAttr(expr=self.dispatch(not_.expr), name="__true__"),
1.49 - params=[], star=None, dstar=None))
1.50 + args=[], star=None, dstar=None))
1.51 return result
1.52
1.53 # Operators.