On 02/15/2011 08:21 AM, Robert Bradshaw wrote:
On Mon, Feb 14, 2011 at 9:49 PM, Vitja Makarov<vitja.maka...@gmail.com>  wrote:
2011/2/15 Robert Bradshaw<rober...@math.washington.edu>:
On Sun, Feb 13, 2011 at 11:40 PM, Vitja Makarov<vitja.maka...@gmail.com>  wrote:
Hi!

In order to implement "reaching definitions" algorithm.
I'm now working on control-flow (or data-flow) graph.

Here is funny picture made with graphviz ;)

http://piccy.info/view3/1099337/ca29d7054d09bd0503cefa25f5f49420/1200/
Cool. Any plans on handling exceptions?

Sure, but I don't have much time for this :(

Linear block inside try...except body should be split by assignments
and each subblock should point to exception handling entry point.
Would every possible failing sub-expression have to point to the
exception handling point(s)? I suppose it depends on whether you'll be
handling more than assignment tracking.

As result I want to have set of possible assignments for each NameNode position.

So handling of uninitialized variables, unused, unused results should be easy,
later it may help to implement local variable deletion. And guess that
could help type inference.
Ye.

I'm thinking that transforming NameNode + various assignment/lookup nodes into "opcode nodes" such as SetLocalNode, GetLocalNode, SetGlobalNode, GetAttributeNode and so on would be a natural step to make such code cleaner. Then (after an isolated transform doing this) the logic would just need to act on individual nodes, not combination of nodes.

Just an idea.

Dag Sverre
_______________________________________________
cython-devel mailing list
cython-devel@python.org
http://mail.python.org/mailman/listinfo/cython-devel

Reply via email to