# HG changeset patch # User Sigurd Meldgaard # Date 1257158010 -3600 # Node ID 4e2a224931167e3433de9872779cf4035725e63b # Parent 8f4dbf37a96f886f55cc1ca065ffac480228b464 flow: Fixed major error in the work-list implementation Before we only added the first statement to the worklist, so if at some statement in a body no changes where made, the values of that statement would not be propagated further. Now all statements are entered from the beginning. diff -r 8f4dbf37a96f -r 4e2a22493116 pysmcl/flow.py --- a/pysmcl/flow.py Thu Oct 29 16:58:48 2009 +0100 +++ b/pysmcl/flow.py Mon Nov 02 11:33:30 2009 +0100 @@ -26,7 +26,7 @@ worklist = [] Flow().flow(function) - worklist.append(function) + worklist+=[i for i in ast.walk(function) if isinstance(i,ast.stmt)] # main cycle while len(worklist) != 0: