summaryrefslogtreecommitdiff
path: root/Python/symtable.c
Commit message (Collapse)AuthorAgeFilesLines
* Merged revisions 85757 via svnmerge fromBenjamin Peterson2010-10-201-0/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85757 | benjamin.peterson | 2010-10-20 16:25:23 -0500 (Wed, 20 Oct 2010) | 1 line fix uninitialized struct member #10152 ........
* Merged revisions 85562 via svnmerge fromBenjamin Peterson2010-10-161-1/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/branches/py3k ........ r85562 | benjamin.peterson | 2010-10-15 22:45:45 -0500 (Fri, 15 Oct 2010) | 1 line don't identify the toplevel namespace by name #9997 ........
* different spellings are just unacceptableBenjamin Peterson2010-06-111-1/+1
|
* Untabify C files. Will watch buildbots.Antoine Pitrou2010-05-091-1220/+1220
|
* Issue #2333: Backport set and dict comprehensions syntax.Alexandre Vassalotti2010-01-111-9/+73
|
* Issue #2335: Backport set literals syntax from Python 3.x.Alexandre Vassalotti2010-01-091-0/+3
|
* genexps have linenosBenjamin Peterson2009-11-201-1/+1
|
* provide line number for lambdasBenjamin Peterson2009-11-201-2/+1
|
* fix grammarBenjamin Peterson2009-06-231-1/+1
|
* remove tmpname support since it's no longer usedBenjamin Peterson2009-06-211-26/+0
|
* don't need to add the name 'lambda' as assignedBenjamin Peterson2009-06-211-2/+1
|
* fix error handlingBenjamin Peterson2009-04-021-4/+7
|
* Add check for PyDict_Update() error.Jeremy Hylton2009-03-311-1/+2
|
* Global statements from one function leaked into parallel functions.Jeremy Hylton2009-03-311-22/+101
| | | | | | | | | | | | | Re http://bugs.python.org/issue4315 The symbol table used the same name dictionaries to recursively analyze each of its child blocks, even though the dictionaries are modified during analysis. The fix is to create new temporary dictionaries via the analyze_child_block(). The only information that needs to propagate back up is the names of the free variables. Add more comments and break out a helper function. This code doesn't get any easier to understand when you only look at it once a year.
* uhh PySTEntry->ste_unoptimized has to be exposed tooBenjamin Peterson2008-08-171-0/+1
|
* expose PySTEntry.nested so the symtable module will workBenjamin Peterson2008-08-171-0/+1
|
* PySTEntry's constructor is static; there's no point in a fancy API nameBenjamin Peterson2008-08-161-4/+4
|
* include filename and line number in SyntaxErrorBenjamin Peterson2008-08-161-0/+3
|
* This reverts r63675 based on the discussion in this thread:Gregory P. Smith2008-06-091-14/+14
| | | | | | | http://mail.python.org/pipermail/python-dev/2008-June/079988.html Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names in the spirit of 3.0 are available via a #define only. See the email thread.
* Renamed PyString to PyBytesChristian Heimes2008-05-261-14/+14
|
* Patch #2511: Give the "excepthandler" AST item proper attributes by making ↵Georg Brandl2008-03-301-5/+5
| | | | it a Sum.
* Handle memory allocation failure. Found by Adam OlsenNeal Norwitz2008-03-151-2/+3
|
* Patch #1759: Backport of PEP 3129 class decoratorsChristian Heimes2008-02-231-2/+4
| | | | with some help from Georg
* PEP 3123: Provide forward compatibility with Python 3.0, while keepingMartin v. Löwis2007-07-211-2/+1
| | | | | backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and PyVarObject_HEAD_INIT.
* Handle PyString_FromInternedString() failing (unlikely, but possible).Neal Norwitz2006-08-191-9/+8
| | | | | | Klocwork #325 (I'm not backporting this, but if someone wants to, feel free.)
* Klocwork made another run and found a bunch more problems.Neal Norwitz2006-08-121-1/+6
| | | | | | | This is the first batch of fixes that should be easy to verify based on context. This fixes problem numbers: 220 (ast), 323-324 (symtable), 321-322 (structseq), 215 (array), 210 (hotshot), 182 (codecs), 209 (etree).
* Handle more mem alloc issues found with failmallocNeal Norwitz2006-07-231-0/+2
|
* Fix more memory allocation issues found with failmalloc.Neal Norwitz2006-07-221-1/+1
|
* Handle more memory allocation failures without crashing.Neal Norwitz2006-07-211-2/+10
|
* Patch #1346214: correctly optimize away "if 0"-style stmtsGeorg Brandl2006-06-041-1/+20
| | | | (thanks to Neal for review)
* Make symtable.c safe for C++ compilers. Changed macros in the same way asAnthony Baxter2006-04-121-11/+13
| | | | compile.c to add a cast.
* No need to export PySTEntry_New, it is only used in symtable.cNeal Norwitz2006-02-281-1/+2
|
* PEP 343 -- the with-statement.Guido van Rossum2006-02-271-14/+30
| | | | | | | | | | | | | This was started by Mike Bland and completed by Guido (with help from Neal). This still needs a __future__ statement added; Thomas is working on Michael's patch for that aspect. There's a small amount of code cleanup and refactoring in ast.c, compile.c and ceval.c (I fixed the lltrace behavior when EXT_POP is used -- however I had to make lltrace a static global).
* PEP 308 implementation, including minor refdocs and some testcases. ItThomas Wouters2006-02-271-0/+5
| | | | | | | | | | | | | | | | | | | | | | | | | breaks the parser module, because it adds the if/else construct as well as two new grammar rules for backward compatibility. If no one else fixes parsermodule, I guess I'll go ahead and fix it later this week. The TeX code was checked with texcheck.py, but not rendered. There is actually a slight incompatibility: >>> (x for x in lambda:0) Traceback (most recent call last): File "<stdin>", line 1, in <module> TypeError: iteration over non-sequence changes into >>> (x for x in lambda: 0) File "<stdin>", line 1 (x for x in lambda: 0) ^ SyntaxError: invalid syntax Since there's no way the former version can be useful, it's probably a bugfix ;)
* Use Py_ssize_t to count theMartin v. Löwis2006-02-161-1/+1
|
* Merge ssize_t branch.Martin v. Löwis2006-02-151-3/+5
|
* analyze_cells(): This no longer compiled under VC 7.1.Tim Peters2006-01-081-1/+2
| | | | Move declaration of local `flags` to top of block.
* Fix icc warnings: conversion from "long" to "int" may lose significant bitsNeal Norwitz2006-01-081-10/+11
|
* Fix icc warnings: shadowing local variable (i) and complex is set but not ↵Neal Norwitz2006-01-071-3/+2
| | | | used, so remove
* Bug #889500, fix line number on SyntaxWarning for global declarations.Neal Norwitz2005-12-191-7/+10
|
* Fix a few more ref leaks. Backport candidateNeal Norwitz2005-11-241-1/+3
|
* Last batch of ref leaks in new AST code.Neal Norwitz2005-11-191-4/+8
| | | | | | Also converted a bunch of assert(0) to SystemError's. There are still printfs, etc that need to be cleaned up.
* Bring handling of genexpr in line with other anonymous scope namesNick Coghlan2005-11-161-4/+3
|
* Fix a lot of memory and ref leaks in error paths.Neal Norwitz2005-11-131-33/+75
| | | | | | (Call symtable_exit_block or compiler_exit_scope as appropriate) Use PyMem_Free on c_future since it was allocated with PyMem_Malloc
* Do not pollute name block_ty, prefix with _Py_Neal Norwitz2005-10-241-3/+3
|
* Fix check_unoptimized() function. The only optimized namespaces areNeil Schemenauer2005-10-231-1/+1
| | | | | in function blocks. This elimiates spurious warnings about "import *" and related statements at the class level.
* Fix private name mangling. The symtable also must do mangles so thatNeil Schemenauer2005-10-231-14/+30
| | | | the scope of names can be correctly determined.
* Fix a bunch of imports to use code.h instead of compile.h.Jeremy Hylton2005-10-211-1/+0
| | | | Remove duplicate declarations from compile.h
* ANSI-C-ify the placement of local var declarations.Armin Rigo2005-10-211-2/+4
|
* Merge ast-branch to headJeremy Hylton2005-10-201-63/+1178
| | | | | | | | | | This change implements a new bytecode compiler, based on a transformation of the parse tree to an abstract syntax defined in Parser/Python.asdl. The compiler implementation is not complete, but it is in stable enough shape to run the entire test suite excepting two disabled tests.