diff options
author | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-08-27 21:02:51 (GMT) |
---|---|---|
committer | Jeremy Hylton <jeremy@alum.mit.edu> | 2001-08-27 21:02:51 (GMT) |
commit | 7e30c9bb5a6a44829d1df01354523f5c3467583d (patch) | |
tree | 1e292a0ddc847287e282e09f941f2bf8c5ca75c0 /Lib/compiler/ast.py | |
parent | 058a5adad02f5ae4652d1cd1d0e5ad4ece04fa85 (diff) | |
download | cpython-7e30c9bb5a6a44829d1df01354523f5c3467583d.zip cpython-7e30c9bb5a6a44829d1df01354523f5c3467583d.tar.gz cpython-7e30c9bb5a6a44829d1df01354523f5c3467583d.tar.bz2 |
Add lookup_name() to optimize use of stack frames
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)
Diffstat (limited to 'Lib/compiler/ast.py')
0 files changed, 0 insertions, 0 deletions