# HG changeset patch # User paulb@jeremy # Date 1155075900 -7200 # Node ID df3d2b28e2aeb98c089e058539507a514814dab6 # Parent 70e6d94138acc39e43bffc4512d83fa8ccf6b960 Added tracing of the system state. diff -r 70e6d94138ac -r df3d2b28e2ae annotate.py --- a/annotate.py Wed Aug 09 00:24:42 2006 +0200 +++ b/annotate.py Wed Aug 09 00:25:00 2006 +0200 @@ -41,6 +41,7 @@ if type not in node.types: node.types.append(type) self.count += 1 + print self.count system = System() @@ -494,6 +495,11 @@ Invoke using the given 'invoke' node the given 'subprogram'. """ + # Test to see if anything has changed. + + if hasattr(invoke, "syscount") and invoke.syscount == self.system.count: + return + # Test for context information. if hasattr(subprogram, "context"): @@ -528,6 +534,10 @@ for locals in annotator.return_locals: self.namespace.merge_namespace(locals) + # Remember the state of the system. + + invoke.syscount = self.system.count + def make_items(self, invocation, subprogram, context): """