[Python-Dev] Re: Another test_compiler mystery
Jeremy Hylton
jhylton at gmail.com
Tue Aug 10 21:31:39 CEST 2004
On Tue, 10 Aug 2004 20:16:38 +0100, Armin Rigo <arigo at tunes.org> wrote:
> Also note that even though the compiler package may only have changed a bit,
> the parser C module definitely has, e.g. when genexprs and decorators were
> introduced. I wonder what effect this has on the depth of concrete syntax
> trees. I also wonder if the parser module tries to be safe again C stack
> overflow when building hugely nested data structures.
I don't think the compiler package has changed much at all, but it
consumes the deeply nested concrete syntax trees created by the parser
module. The compiler.transformer module uses recursion a lot.
Several releases ago I added some hacks to reduce the number of frames
(basically did tail call optimization by hand in a few spots). It may
be that those hacks are no longer sufficient.
where's-that-ast-branch-when-you-need-it-ly y'rs,
Jeremy
More information about the Python-Dev
mailing list