changeset 138:bcde6c7bf06d

flow: bug_fix Some sets where initialized as lists giving strange behaviour.
author Sigurd Meldgaard <stm@daimi.au.dk>
date Wed, 04 Nov 2009 14:54:05 +0100
parents 2f8f9b0013d5
children 10d98908dee7
files pysmcl/flow.py
diffstat 1 files changed, 3 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/pysmcl/flow.py	Wed Nov 04 14:53:04 2009 +0100
+++ b/pysmcl/flow.py	Wed Nov 04 14:54:05 2009 +0100
@@ -2,11 +2,10 @@
 import StringIO
 
 # Import PySMCL packages.
-from pysmcl.pretty_print import PrettyPrinter
+from pysmcl.pretty_print import PrettyPrinter, pprint
 
 from pysmcl.graph import Node
 
-
 def analyze(function, join, combine, key, bottom):
     """
     Doing a simple intra procedural forward analysis using the
@@ -69,8 +68,8 @@
         self.init_statements(function)
         #function.body.append(ast.Pass)
         function.parents = set()
-        function.children = [function.body[0]]
-        function.body[0].parents = [function]
+        function.children = set([function.body[0]])
+        function.body[0].parents = set([function])
         self.flow_body(function.body)
 
     def make_edge(self, from_nodes, to_node):