On Wed, Oct 19, 2005 at 05:08:11PM -0400, Jeremy Hylton wrote: > I think you're right that there is no way to treat nodes generically. > Perhaps we should generate some generic traversal code-- something > that takes an AST node and a function pointer of visitor functions. > It walks the AST and calls each visitor function as the node is > encountered (the function could be NULL in which case nothing is > done). Then it would be easy to write little analyses like the one > for if 0:.
Yes, I was thinking of doing that but worried that I might be overdesigning things. Do you think that it's okay to have each little analysis do its own traversal or should we try to group them? Maybe that's premature optimization. However, I wonder how much slower the new compiler is vs the old. Neil _______________________________________________ Compiler-sig mailing list [email protected] http://mail.python.org/mailman/listinfo/compiler-sig
