• Jeremy Hylton's avatar
    Add lookup_name() to optimize use of stack frames · 7e30c9bb
    Jeremy Hylton yazdı
    The use of com_node() introduces a lot of extra stack frames, enough
    to cause a stack overflow compiling test.test_parser with the standard
    interpreter recursionlimit.  The com_node() is a convenience function
    that hides the dispatch details, but comes at a very high cost.  It is
    more efficient to dispatch directly in the callers.  In these cases,
    use lookup_node() and call the dispatched node directly.
    
    Also handle yield_stmt in a way that will work with Python 2.1
    (suggested by Shane Hathaway)
    7e30c9bb
transformer.py 41.9 KB