Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Fix some missing checks after PyTuple_New, PyList_New, PyDict_New | Georg Brandl | 2006-03-17 | 1 | -1/+3 |
| | |||||
* | Fix SF bug #1448804 and ad a test to ensure that all subscript operations ↵ | Nick Coghlan | 2006-03-13 | 1 | -24/+29 |
| | | | | continue to be handled correctly | ||||
* | Um, I thought I'd already checked this in. | Guido van Rossum | 2006-03-10 | 1 | -3/+1 |
| | | | | | | | Anyway, this is the changes to the with-statement so that __exit__ must return a true value in order for a pending exception to be ignored. The PEP (343) is already updated. | ||||
* | SF bug 1442442: LIST_APPEND optimization got lost in the AST merge. | Neal Norwitz | 2006-03-03 | 1 | -3/+4 |
| | | | | Add it back. | ||||
* | Fix refleak if from __future__ import was not first | Neal Norwitz | 2006-03-02 | 1 | -0/+1 |
| | |||||
* | Update known issues to reflect reality | Neal Norwitz | 2006-03-02 | 1 | -4/+1 |
| | |||||
* | Patch #1440601: Add col_offset attribute to AST nodes. | Martin v. Löwis | 2006-03-01 | 1 | -2/+2 |
| | |||||
* | Tabify and reflow some long lines. | Jeremy Hylton | 2006-03-01 | 1 | -696/+702 |
| | | | | | Much of the peephole optimizer is now indented badly, but it's about to be revised anyway. | ||||
* | Generally inehrit codeflags that are in PyCF_MASK, instead of writing it out | Thomas Wouters | 2006-02-28 | 1 | -4/+4 |
| | | | | | in multiple places. This makes compile()/eval()/etc also inherit the absolute-import codeflag, like division and with-statement already were. | ||||
* | from __future__ import with_statement addon for 'with', mostly written by | Thomas Wouters | 2006-02-28 | 1 | -0/+2 |
| | | | | Neal. | ||||
* | SF patch #1438387, PEP 328: relative and absolute imports. | Thomas Wouters | 2006-02-28 | 1 | -0/+27 |
| | | | | | | | | | | | | | | | | | | | | | | | - IMPORT_NAME takes an extra argument from the stack: the relativeness of the import. Only passed to __import__ when it's not -1. - __import__() takes an optional 5th argument for the same thing; it __defaults to -1 (old semantics: try relative, then absolute) - 'from . import name' imports name (be it module or regular attribute) from the current module's *package*. Likewise, 'from .module import name' will import name from a sibling to the current module. - Importing from outside a package is not allowed; 'from . import sys' in a toplevel module will not work, nor will 'from .. import sys' in a (single-level) package. - 'from __future__ import absolute_import' will turn on the new semantics for import and from-import: imports will be absolute, except for from-import with dots. Includes tests for regular imports and importhooks, parser changes and a NEWS item, but no compiler-package changes or documentation changes. | ||||
* | Clarify C-style exception handling with proper label name. | Thomas Wouters | 2006-02-27 | 1 | -3/+3 |
| | |||||
* | Fix assertions. | Thomas Wouters | 2006-02-27 | 1 | -3/+3 |
| | |||||
* | PEP 343 -- the with-statement. | Guido van Rossum | 2006-02-27 | 1 | -4/+162 |
| | | | | | | | | | | | | | 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. It | Thomas Wouters | 2006-02-27 | 1 | -0/+26 |
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 ;) | ||||
* | Merge ssize_t branch. | Martin v. Löwis | 2006-02-15 | 1 | -9/+13 |
| | |||||
* | Fix icc warnings: single bit fields should be unsigned, shadowing local ↵ | Neal Norwitz | 2006-01-07 | 1 | -16/+16 |
| | | | | variables | ||||
* | Adjust usage of compiler_use_new_block to its return type. | Martin v. Löwis | 2006-01-02 | 1 | -2/+2 |
| | |||||
* | fixed compilation with an ordinary C89 compiler | Fredrik Lundh | 2005-12-18 | 1 | -2/+1 |
| | |||||
* | Fix Armin's bug 1333982. He found it, he didn't created it :-) | Neal Norwitz | 2005-12-18 | 1 | -9/+1 |
| | | | | | | | | | | This code generated a C assertion: assert 1, ([s for s in x] + [s for s in x]) pass assert was completely broken, it needed to use the proper block. compiler_use_block() is now no longer used, so remove it. | ||||
* | Handle more error conditions with SystemError | Neal Norwitz | 2005-12-18 | 1 | -8/+22 |
| | |||||
* | Set MemoryError when alloc fails | Neal Norwitz | 2005-12-18 | 1 | -3/+11 |
| | |||||
* | Merge from ast-arena. This reduces the code in Python/ast.c by ~300 lines, | Neal Norwitz | 2005-12-17 | 1 | -11/+14 |
| | | | | simplifies a lot of error handling code, and fixes many memory leaks. | ||||
* | Simplify logic for handling import * | Neal Norwitz | 2005-12-06 | 1 | -6/+3 |
| | |||||
* | Fix a few more ref leaks. Backport candidate | Neal Norwitz | 2005-11-24 | 1 | -0/+2 |
| | |||||
* | Fix a few more memory leaks | Neal Norwitz | 2005-11-20 | 1 | -0/+3 |
| | | | | | Document more info about the benefits of configuring without pymalloc when running valgrind | ||||
* | Last batch of ref leaks in new AST code. | Neal Norwitz | 2005-11-19 | 1 | -25/+50 |
| | | | | | | Also converted a bunch of assert(0) to SystemError's. There are still printfs, etc that need to be cleaned up. | ||||
* | Correctly handle identifiers for anonymous scopes and align genexpr name ↵ | Nick Coghlan | 2005-11-16 | 1 | -11/+17 |
| | | | | with symtable.c | ||||
* | Fix a lot of memory and ref leaks in error paths. | Neal Norwitz | 2005-11-13 | 1 | -9/+35 |
| | | | | | | (Call symtable_exit_block or compiler_exit_scope as appropriate) Use PyMem_Free on c_future since it was allocated with PyMem_Malloc | ||||
* | make internal method static | Neal Norwitz | 2005-11-13 | 1 | -1/+1 |
| | |||||
* | Ensure that compiler_exit_scope() is called as necessary to free memory | Neil Schemenauer | 2005-10-25 | 1 | -10/+18 |
| | | | | | allocated by compiler_enter_scope(). Change return type for compiler_exit_scope() to be void. | ||||
* | Fix problem handling EXTENDED_ARGs from SF bug # 1333982 | Neal Norwitz | 2005-10-23 | 1 | -1/+30 |
| | |||||
* | cleanup a bit and reuse instrsize (instruction size). working towards ↵ | Neal Norwitz | 2005-10-23 | 1 | -30/+24 |
| | | | | fixing problems with EXTENDED_ARG | ||||
* | Remove unnecessary local variable. | Neil Schemenauer | 2005-10-23 | 1 | -3/+2 |
| | |||||
* | Fix private name mangling. The symtable also must do mangles so that | Neil Schemenauer | 2005-10-23 | 1 | -4/+16 |
| | | | | the scope of names can be correctly determined. | ||||
* | Use PyTuple_Pack instead of Py_BuildValue. | Neil Schemenauer | 2005-10-23 | 1 | -2/+1 |
| | |||||
* | Fix arigo's funky LOAD_NAME bug: implicit globals inside classes have | Neil Schemenauer | 2005-10-23 | 1 | -1/+2 |
| | | | | | historically been looked up using LOAD_NAME, not LOAD_GLOBAL. looked up by LOAD_NAME, not | ||||
* | Don't stop generating code for import statements after the first "import as" | Neil Schemenauer | 2005-10-23 | 1 | -2/+3 |
| | | | | part. Fixes one bug from #1333982. | ||||
* | Use <lamba> as the function name for lambdas (matches old compiler). | Neil Schemenauer | 2005-10-21 | 1 | -1/+1 |
| | |||||
* | ANSI-C-ify the placement of local var declarations. | Armin Rigo | 2005-10-21 | 1 | -1/+2 |
| | |||||
* | Merge ast-branch to head | Jeremy Hylton | 2005-10-20 | 1 | -5613/+2880 |
| | | | | | | | | | | 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. | ||||
* | com_yield_expr(): Squash new compiler wng about unreferenced local. | Tim Peters | 2005-08-03 | 1 | -1/+0 |
| | |||||
* | PEP 342 implementation. Per Guido's comments, the generator throw() | Phillip J. Eby | 2005-08-02 | 1 | -12/+64 |
| | | | | | method still needs to support string exceptions, and allow None for the third argument. Documentation updates are needed, too. | ||||
* | Fix signedness of various char variables to stop causing a warning under gcc 4. | Brett Cannon | 2005-06-25 | 1 | -1/+1 |
| | |||||
* | Allow classes to be defined with empty parentheses. This means that | Brett Cannon | 2005-03-05 | 1 | -2/+3 |
| | | | | ``class C(): pass`` is no longer a syntax error. | ||||
* | Silence a gcc warning about putting in parentheses around && expressions mixed | Brett Cannon | 2005-03-03 | 1 | -5/+6 |
| | | | | with || expressions. Also clarifies intend of 'if' conditional. | ||||
* | Preserve sign of -0.0 when result is run through marshal. | Raymond Hettinger | 2005-02-23 | 1 | -2/+4 |
| | |||||
* | Document how the pattern recognizer keeps all of its references in bounds. | Raymond Hettinger | 2005-02-21 | 1 | -0/+8 |
| | | | | | | Add a test in case the underlying assumptions ever change (i.e. the compiler starts generating code blocks that are not punctuated by RETURN_VALUE). | ||||
* | Teach the peepholer to fold unary operations on constants. | Raymond Hettinger | 2005-02-20 | 1 | -0/+62 |
| | | | | | Afterwards, -0.5 loads in a single step and no longer requires a runtime UNARY_NEGATIVE operation. | ||||
* | Remove the set conversion which didn't work with: [] in (0,) | Raymond Hettinger | 2005-02-10 | 1 | -53/+1 |
| |