1.1 --- a/simplify/fixinstances.py Sun Jul 29 01:51:44 2007 +0200
1.2 +++ b/simplify/fixinstances.py Sun Jul 29 01:53:25 2007 +0200
1.3 @@ -72,13 +72,11 @@
1.4 # recursion issues) and a list of current namespaces (used to recall
1.5 # namespaces upon invoking internal subprograms).
1.6
1.7 - self.subprograms = set()
1.8 self.current_subprograms = []
1.9
1.10 self.module = module
1.11 - self.process_node(module)
1.12
1.13 - # Then, process all functions and methods.
1.14 + # Process all functions and methods.
1.15
1.16 for subprogram in self.module.simplifier.subprograms:
1.17
1.18 @@ -87,7 +85,16 @@
1.19
1.20 if not getattr(subprogram, "internal", 0):
1.21 for specialised in subprogram.active():
1.22 - self.subprograms.add(self.process_node(specialised))
1.23 + self.process_node(specialised)
1.24 +
1.25 + self.process_node(module)
1.26 +
1.27 + # Fix the simplifier's subprograms list itself.
1.28 +
1.29 + #subprograms = set()
1.30 + #for subprogram in self.module.simplifier.subprograms:
1.31 + # subprograms.add(self._get_replacement(subprogram))
1.32 + #self.module.simplifier.subprograms = subprograms
1.33
1.34 def process_structures(self, module):
1.35
1.36 @@ -231,9 +238,6 @@
1.37 else:
1.38 return value
1.39
1.40 - def dispatch(self, node, *args):
1.41 - return Visitor.dispatch(self, node, *args)
1.42 -
1.43 def visitInvokeFunction(self, invoke):
1.44
1.45 "Transform the 'invoke' node, performing processing on subprograms."
1.46 @@ -247,10 +251,7 @@
1.47 # The special case of internal subprogram invocation is addressed by
1.48 # propagating namespace information to the subprogram and processing it.
1.49
1.50 - subprogram = self.process_node(invoke.ref)
1.51 -
1.52 - if subprogram is not None:
1.53 - self.subprograms.add(subprogram)
1.54 + self.process_node(invoke.ref)
1.55 return invoke
1.56
1.57 # Convenience functions.