summaryrefslogtreecommitdiffstats
path: root/Python/symtable.c
Commit message (Collapse)AuthorAgeFilesLines
* Issue #18408: ste_new() initialize all attributes before handling errorVictor Stinner2013-07-111-13/+9
| | | | If an attribute is not initialized, the destructor can crash
* rather than passing locals to the class body, just execute the class body in ↵Benjamin Peterson2013-05-161-6/+1
| | | | the proper environment
* hide the __class__ closure from the class body (#12370)Benjamin Peterson2013-05-151-15/+19
|
* unify some ast.argument's attrs; change Attribute column offset (closes #16795)Benjamin Peterson2013-03-181-6/+6
| | | | Patch from Sven Brauch.
* create NameConstant AST class for None, True, and False literals (closes #16619)Benjamin Peterson2012-12-061-0/+1
|
* Issue #16546: merge fix from 3.3Mark Dickinson2012-11-251-6/+6
|\
| * Issue #16546: make ast.YieldFrom argument mandatory.Mark Dickinson2012-11-251-6/+6
| |
* | Issue #5765: Merge from 3.3Nick Coghlan2012-11-041-31/+70
|\ \ | |/
| * Issue #5765: Apply a hard recursion limit in the compilerNick Coghlan2012-11-041-29/+68
| | | | | | | | | | | | | | Previously, excessive nesting in expressions would blow the stack and segfault the interpreter. Now, a hard limit based on the configured recursion limit and a hardcoded scaling factor is applied.
* | point errors related to nonlocals and globals to the statement declaring ↵Benjamin Peterson2012-11-011-8/+49
|/ | | | them (closes #10189)
* check return value of _PyUnicode_AsStringBenjamin Peterson2012-10-311-2/+6
|
* Cleanup 'k' when the creation of PySTEntryObject fails. ad3824a90261 used to ↵Christian Heimes2012-09-121-1/+3
|\ | | | | | | decref 'k' in too many error cases.
| * Cleanup 'k' when the creation of PySTEntryObject fails. ad3824a90261 used to ↵Christian Heimes2012-09-121-1/+3
| | | | | | | | decref 'k' in too many error cases.
* | Partly revert ad3824a90261 and add comment about reference ownershipChristian Heimes2012-09-121-2/+1
|\ \ | |/
| * Partly revert ad3824a90261 and add comment about reference ownershipChristian Heimes2012-09-121-2/+1
| |
* | Closed reference leak of variable 'k' in function ste_new which wasn't ↵Christian Heimes2012-09-101-1/+2
|\ \ | |/ | | | | decrefed in error cases
| * Closed reference leak of variable 'k' in function ste_new which wasn't ↵Christian Heimes2012-09-101-1/+2
| | | | | | | | decrefed in error cases
* | Close #14857: fix regression in references to PEP 3135 implicit __class__ ↵Nick Coghlan2012-05-271-11/+8
| | | | | | | | closure variable. Reopens issue #12370, but also updates unittest.mock to workaround that issue
* | make YieldFrom its own distinct from Yield (closes #13780)Benjamin Peterson2012-01-141-2/+6
| |
* | Implement PEP 380 - 'yield from' (closes #11682)Nick Coghlan2012-01-131-19/+0
| |
* | Issue #13343: Fix a SystemError when a lambda expression uses a globalAmaury Forgeot d'Arc2011-11-041-0/+3
|\ \ | |/ | | | | | | variable in the default value of a keyword-only argument: (lambda *, arg=GLOBAL_NAME: None)
| * Issue #13343: Fix a SystemError when a lambda expression uses a globalAmaury Forgeot d'Arc2011-11-041-0/+3
| | | | | | | | | | variable in the default value of a keyword-only argument: (lambda *, arg=GLOBAL_NAME: None)
* | Implement PEP 393.Martin v. Löwis2011-09-281-4/+4
| |
* | fix possibily uninitialized memory usage (closes #12474)Benjamin Peterson2011-07-021-2/+2
| |
* | store the current scope on the stack right awayBenjamin Peterson2011-06-301-21/+18
| |
* | remove VISIT_*_IN_BLOCK macrosBenjamin Peterson2011-06-291-41/+10
| | | | | | | | | | These are pointless because on error, all blocks will be finalized by symtable_dealloc.
* | merge 3.2Benjamin Peterson2011-06-211-6/+6
|\ \ | |/
| * fix indentationBenjamin Peterson2011-06-211-6/+6
| |
* | use a invalid name for the __class__ closure for super() (closes #12370)Benjamin Peterson2011-06-201-8/+11
| | | | | | | | | | This prevents the assignment of __class__ in the class body from breaking super. (Although a determined person could do locals()["@__class__"] = 4)
* | unify TryExcept and TryFinally (closes #12199)Benjamin Peterson2011-05-291-8/+5
| |
* | reflect with statements with multiple items in the AST (closes #12106)Benjamin Peterson2011-05-271-4/+12
| |
* | Issue #9904: fix and clarify some comments + fix indentation in symtable codeEli Bendersky2011-04-101-4/+4
|/
* fix uninitialized struct member #10152Benjamin Peterson2010-10-201-0/+1
|
* don't identify the toplevel namespace by name #9997Benjamin Peterson2010-10-161-1/+1
|
* add column offset to all syntax errorsBenjamin Peterson2010-09-201-24/+37
|
* revert unintended changesBenjamin Peterson2010-07-201-9/+2
|
* move test_trace.py so as not to conflict with future tests for the trace moduleBenjamin Peterson2010-07-201-2/+9
|
* Merged revisions 81906 via svnmerge fromBenjamin Peterson2010-06-111-1/+1
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81906 | benjamin.peterson | 2010-06-11 16:40:37 -0500 (Fri, 11 Jun 2010) | 1 line different spellings are just unacceptable ........
* Recorded merge of revisions 81029 via svnmerge fromAntoine Pitrou2010-05-091-1307/+1307
| | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r81029 | antoine.pitrou | 2010-05-09 16:46:46 +0200 (dim., 09 mai 2010) | 3 lines Untabify C files. Will watch buildbots. ........
* Merged revisions 76423-76424 via svnmerge fromBenjamin Peterson2009-11-201-3/+2
| | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r76423 | benjamin.peterson | 2009-11-19 19:15:53 -0600 (Thu, 19 Nov 2009) | 1 line provide line number for lambdas ........ r76424 | benjamin.peterson | 2009-11-19 19:16:58 -0600 (Thu, 19 Nov 2009) | 1 line genexps have linenos ........
* Merged revisions ↵Benjamin Peterson2009-06-281-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 73376,73393,73398,73400,73404-73405,73409,73419-73421,73432,73457,73460,73485-73486,73488-73489,73501-73502,73513-73514 via svnmerge from svn+ssh://pythondev@svn.python.org/python/trunk ........ r73376 | benjamin.peterson | 2009-06-11 17:29:23 -0500 (Thu, 11 Jun 2009) | 1 line remove check for case handled in sub-function ........ r73393 | alexandre.vassalotti | 2009-06-12 13:56:57 -0500 (Fri, 12 Jun 2009) | 2 lines Clear reference to the static PyExc_RecursionErrorInst in _PyExc_Fini. ........ r73398 | alexandre.vassalotti | 2009-06-12 15:57:12 -0500 (Fri, 12 Jun 2009) | 3 lines Add const qualifier to PyErr_SetFromErrnoWithFilename and to PyErr_SetFromErrnoWithUnicodeFilename. ........ r73400 | alexandre.vassalotti | 2009-06-12 16:43:47 -0500 (Fri, 12 Jun 2009) | 2 lines Delete outdated make file for building the parser with MSVC 6. ........ r73404 | benjamin.peterson | 2009-06-12 20:40:00 -0500 (Fri, 12 Jun 2009) | 1 line keep the slice.step field as NULL if no step expression is given ........ r73405 | benjamin.peterson | 2009-06-12 22:46:30 -0500 (Fri, 12 Jun 2009) | 1 line prevent import statements from assigning to None ........ r73409 | benjamin.peterson | 2009-06-13 08:06:21 -0500 (Sat, 13 Jun 2009) | 1 line allow importing from a module named None if it has an 'as' clause ........ r73419 | benjamin.peterson | 2009-06-13 11:19:19 -0500 (Sat, 13 Jun 2009) | 1 line set Print.values to NULL if there are no values ........ r73420 | benjamin.peterson | 2009-06-13 12:08:53 -0500 (Sat, 13 Jun 2009) | 1 line give a better error message when deleting () ........ r73421 | benjamin.peterson | 2009-06-13 15:23:33 -0500 (Sat, 13 Jun 2009) | 1 line when no module is given in a 'from' relative import, make ImportFrom.module NULL ........ r73432 | amaury.forgeotdarc | 2009-06-14 16:20:40 -0500 (Sun, 14 Jun 2009) | 3 lines #6227: Because of a wrong indentation, the test was not testing what it should. Ensure that the snippet in doctest_aliases actually contains aliases. ........ r73457 | benjamin.peterson | 2009-06-16 18:13:09 -0500 (Tue, 16 Jun 2009) | 1 line add underscores ........ r73460 | benjamin.peterson | 2009-06-16 22:23:04 -0500 (Tue, 16 Jun 2009) | 1 line remove unused 'encoding' member from the compiler struct ........ r73485 | benjamin.peterson | 2009-06-19 17:07:47 -0500 (Fri, 19 Jun 2009) | 1 line remove duplicate test ........ r73486 | benjamin.peterson | 2009-06-19 17:09:17 -0500 (Fri, 19 Jun 2009) | 1 line add missing assertion #6313 ........ r73488 | benjamin.peterson | 2009-06-19 17:16:28 -0500 (Fri, 19 Jun 2009) | 1 line show that this one isn't used ........ r73489 | benjamin.peterson | 2009-06-19 17:21:12 -0500 (Fri, 19 Jun 2009) | 1 line use closures ........ r73501 | benjamin.peterson | 2009-06-21 18:01:07 -0500 (Sun, 21 Jun 2009) | 1 line don't need to add the name 'lambda' as assigned ........ r73502 | benjamin.peterson | 2009-06-21 18:03:36 -0500 (Sun, 21 Jun 2009) | 1 line remove tmpname support since it's no longer used ........ r73513 | benjamin.peterson | 2009-06-22 20:18:57 -0500 (Mon, 22 Jun 2009) | 1 line fix grammar ........ r73514 | benjamin.peterson | 2009-06-22 22:01:56 -0500 (Mon, 22 Jun 2009) | 1 line remove some unused symtable constants ........
* fix error handling of PyNumber_InPlaceOr #6000Benjamin Peterson2009-05-121-16/+26
|
* remove unused variableBenjamin Peterson2009-04-021-1/+0
|
* rewrite error handling to make senseBenjamin Peterson2009-04-021-3/+7
|
* fix ref leaksBenjamin Peterson2009-04-021-0/+2
|
* Merged revisions 70801,70809 via svnmerge fromJeremy Hylton2009-03-311-20/+94
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk The merge ran into a lot of conflicts because dicts were replaced with sets in the Python 3 version of the symbol table. ........ r70801 | jeremy.hylton | 2009-03-31 09:17:03 -0400 (Tue, 31 Mar 2009) | 3 lines Add is_declared_global() which distinguishes between implicit and explicit global variables. ........ r70809 | jeremy.hylton | 2009-03-31 09:48:15 -0400 (Tue, 31 Mar 2009) | 14 lines Global statements from one function leaked into parallel functions. 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. ........
* instead of hacking __locals__ in during bytecode generation, put it in the ↵Benjamin Peterson2009-03-031-2/+5
| | | | symtable
* Issue #1717: rename tp_compare to tp_reserved. I'll change theMark Dickinson2009-02-021-1/+1
| | | | | type of tp_compare in a separate commit, for ease of reversion should things go wrong.
* Merged revisions 65715,65724,65726,65732,65736-65739,65775 via svnmerge fromBenjamin Peterson2008-08-171-4/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | svn+ssh://pythondev@svn.python.org/python/trunk ........ r65715 | benjamin.peterson | 2008-08-16 16:04:16 -0500 (Sat, 16 Aug 2008) | 1 line add some documentation for symtable ........ r65724 | benjamin.peterson | 2008-08-16 17:11:33 -0500 (Sat, 16 Aug 2008) | 2 lines include filename and line number in SyntaxError ........ r65726 | georg.brandl | 2008-08-16 17:37:05 -0500 (Sat, 16 Aug 2008) | 2 lines Review symtable docs. ........ r65732 | benjamin.peterson | 2008-08-16 18:29:40 -0500 (Sat, 16 Aug 2008) | 1 line PySTEntry's constructor is static; there's no point in a fancy API name ........ r65736 | benjamin.peterson | 2008-08-16 20:09:17 -0500 (Sat, 16 Aug 2008) | 1 line expose PySTEntry.nested so the symtable module will work ........ r65737 | benjamin.peterson | 2008-08-16 20:17:15 -0500 (Sat, 16 Aug 2008) | 1 line a few improvements ........ r65738 | benjamin.peterson | 2008-08-16 20:27:30 -0500 (Sat, 16 Aug 2008) | 1 line fix compile errors ........ r65739 | benjamin.peterson | 2008-08-16 21:23:43 -0500 (Sat, 16 Aug 2008) | 1 line uhh PySTEntry->ste_unoptimized has to be exposed too ........ r65775 | benjamin.peterson | 2008-08-17 12:13:26 -0500 (Sun, 17 Aug 2008) | 5 lines get the symtable module back in working order - Fix broken functions - Add (hopefully) extensive tests - Modernize a little ........
* Rename PyUnicode_AsString -> _PyUnicode_AsString andMarc-André Lemburg2008-08-071-2/+2
| | | | | | | | | PyUnicode_AsStringAndSize -> _PyUnicode_AsStringAndSize to mark them for interpreter internal use only. We'll have to rework these APIs or create new ones for the purpose of accessing the UTF-8 representation of Unicode objects for 3.1.