1.1 --- a/simplify/ast.py Mon Aug 06 00:54:45 2007 +0200
1.2 +++ b/simplify/ast.py Sun Aug 12 00:32:16 2007 +0200
1.3 @@ -775,12 +775,12 @@
1.4
1.5 def _visitConst(self, node, value):
1.6 key = "%s-%s" % (value.__class__.__name__, value)
1.7 + if node is not None:
1.8 + result = Constant(node, 1, name=repr(value), value=value)
1.9 + else:
1.10 + result = Constant(name=repr(value), value=value)
1.11 if not self.constants.has_key(key):
1.12 - self.constants[key] = Constant(name=repr(value), value=value)
1.13 - if node is not None:
1.14 - result = InvokeFunction(node, 1, expr=LoadName(name=self.constants[key].typename))
1.15 - else:
1.16 - result = InvokeFunction(expr=LoadName(name=self.constants[key].typename))
1.17 + self.constants[key] = result
1.18 return result
1.19
1.20 def visitContinue(self, continue_):