1.1 --- a/simplified.py Fri Jan 26 01:26:28 2007 +0100
1.2 +++ b/simplified.py Tue Feb 06 00:56:25 2007 +0100
1.3 @@ -309,7 +309,7 @@
1.4
1.5 # Add links to copied nodes from original AST nodes.
1.6
1.7 - if node.original is not None:
1.8 + if node.original is not None and node.defining:
1.9 if not hasattr(node.original, "_nodes"):
1.10 node.original._nodes = []
1.11 node.original._nodes.append(node)
2.1 --- a/simplify.py Fri Jan 26 01:26:28 2007 +0100
2.2 +++ b/simplify.py Tue Feb 06 00:56:25 2007 +0100
2.3 @@ -833,7 +833,9 @@
2.4 (dstar)
2.5 """
2.6
2.7 - subprogram = Subprogram(name=function.name, module=self.module, structures=self.current_structures[:],
2.8 + # NOTE: Making the actual subprogram defining, too.
2.9 +
2.10 + subprogram = Subprogram(function, 1, name=function.name, module=self.module, structures=self.current_structures[:],
2.11 internal=0, returns_value=1, star=None, dstar=None, is_method=self.within_class, original_def=function)
2.12
2.13 self.current_subprograms.append(subprogram)
2.14 @@ -945,8 +947,9 @@
2.15
2.16 # Make a subprogram for the function and record it outside the main
2.17 # tree.
2.18 + # NOTE: Making the actual subprogram defining, too.
2.19
2.20 - subprogram = Subprogram(name=None, module=self.module, internal=0, returns_value=1, star=None, dstar=None, original_def=lambda_)
2.21 + subprogram = Subprogram(lambda_, 1, name=None, module=self.module, internal=0, returns_value=1, star=None, dstar=None, original_def=lambda_)
2.22 self.current_subprograms.append(subprogram)
2.23 subprogram.code = [ReturnFromFunction(expr=self.dispatch(lambda_.code))]
2.24 self.current_subprograms.pop()