Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Issue 2117. Update compiler module to handle class decorators. | Facundo Batista | 2008-02-25 | 2 | -2/+18 |
| | | | | Thanks Thomas Herve | ||||
* | Patch #2167 from calvin: Remove unused imports | Christian Heimes | 2008-02-23 | 1 | -1/+0 |
| | |||||
* | Replaced import of the 'new' module with 'types' module and added a ↵ | Christian Heimes | 2007-11-27 | 1 | -2/+2 |
| | | | | deprecation warning to the 'new' module. | ||||
* | Backport PEP 3110's new 'except' syntax to 2.6. | Collin Winter | 2007-05-18 | 1 | -1/+1 |
| | |||||
* | Patch #1638243: the compiler package is now able to correctly compile | Georg Brandl | 2007-01-27 | 2 | -1/+3 |
| | | | | | a with statement; previously, executing code containing a with statement compiled by the compiler package crashed the interpreter. | ||||
* | Remove trailing comma. | Georg Brandl | 2006-10-29 | 1 | -1/+1 |
| | |||||
* | Bug #1586448: the compiler module now emits the same bytecode for | Georg Brandl | 2006-10-29 | 1 | -7/+5 |
| | | | | | list comprehensions as the builtin compiler, using the LIST_APPEND opcode. | ||||
* | Fix a bug in the ``compiler`` package that caused invalid code to be | Neil Schemenauer | 2006-08-16 | 3 | -9/+16 |
| | | | | generated for generator expressions. | ||||
* | Fix the 'compiler' package to generate correct code for MAKE_CLOSURE. | Neil Schemenauer | 2006-08-04 | 1 | -26/+13 |
| | | | | | | In the 2.5 development cycle, MAKE_CLOSURE as changed to take free variables as a tuple rather than as individual items on the stack. Closes patch #1534084. | ||||
* | Revert rev 42617, it was introduced to work around bug #1441397. | Georg Brandl | 2006-07-29 | 1 | -7/+0 |
| | | | | test_compiler now passes again. | ||||
* | Bug #1441397: The compiler module now recognizes module and function | Georg Brandl | 2006-07-29 | 1 | -0/+1 |
| | | | | docstrings correctly as it did in Python 2.4. | ||||
* | Whitespace normalization. | Tim Peters | 2006-06-27 | 1 | -1/+1 |
| | |||||
* | Set lineno correctly on list, tuple and dict literals. | Georg Brandl | 2006-06-22 | 1 | -5/+5 |
| | |||||
* | fix [ 1509132 ] compiler module builds incorrect AST for TryExceptFinally | Georg Brandl | 2006-06-21 | 1 | -18/+23 |
| | |||||
* | Fix errors found by pychecker | Neal Norwitz | 2006-06-11 | 2 | -3/+1 |
| | |||||
* | Bug #1385040: don't allow "def foo(a=1, b): pass" in the compiler package. | Georg Brandl | 2006-05-03 | 1 | -7/+5 |
| | |||||
* | Get rid of __context__, per the latest changes to PEP 343 and python-dev | Guido van Rossum | 2006-05-02 | 1 | -2/+0 |
| | | | | | | | | discussion. There are two places of documentation that still mention __context__: Doc/lib/libstdtypes.tex -- I wasn't quite sure how to rewrite that without spending a whole lot of time thinking about it; and whatsnew, which Andrew usually likes to change himself. | ||||
* | Use absolute imports | Neal Norwitz | 2006-04-03 | 3 | -6/+6 |
| | |||||
* | Teach the compiler module about augmented assignment to tuple subscripts | Nick Coghlan | 2006-03-14 | 1 | -4/+2 |
| | |||||
* | Um, I thought I'd already checked this in. | Guido van Rossum | 2006-03-10 | 2 | -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. | ||||
* | Whitespace normalization. | Tim Peters | 2006-03-04 | 1 | -3/+3 |
| | |||||
* | SF bug 1442442: LIST_APPEND optimization got lost in the AST merge. | Neal Norwitz | 2006-03-03 | 1 | -0/+1 |
| | | | | Add it back. | ||||
* | Fix compiler breakage related to absolute imports | Neal Norwitz | 2006-03-03 | 1 | -2/+2 |
| | |||||
* | Hopefully this removes all vestiges of CO_GENERATOR_ALLOWED that can | Neal Norwitz | 2006-03-03 | 2 | -4/+2 |
| | | | | be removed in 2.x. | ||||
* | Add support for absolute/relative imports and if/else expressions: | Thomas Wouters | 2006-03-03 | 5 | -19/+82 |
| | | | | | | | | | - regenerate ast.py - add future flags for absolute-import and with-statement so they (hopefully) properly get set in code-object flags - try out if/else expressions in actual code for the hell of it. Seems to generate the same kind of bytecode as the normal compiler. | ||||
* | Fix failure of test_compiler.py when compiling test_contextlib.py. | Guido van Rossum | 2006-03-02 | 1 | -3/+3 |
| | | | | | | The culprit was an expression-less yield -- the first apparently in the standard library. I added a unit test for this. Also removed the hack to force compilation of test_with.py. | ||||
* | from __future__ import with_statement addon for 'with', mostly written by | Thomas Wouters | 2006-02-28 | 1 | -1/+2 |
| | | | | Neal. | ||||
* | Whitespace normalization. | Tim Peters | 2006-02-28 | 1 | -3/+3 |
| | |||||
* | Forgot to explain the effect of the new opcode. | Guido van Rossum | 2006-02-28 | 1 | -0/+1 |
| | | | | Sigh -- we really should have one place for all opcode metadata. | ||||
* | Update the compiler package to compile the with-statement. | Guido van Rossum | 2006-02-28 | 2 | -0/+62 |
| | | | | Jeremy, please review! | ||||
* | PEP 343 -- the with-statement. | Guido van Rossum | 2006-02-27 | 1 | -3/+28 |
| | | | | | | | | | | | | | 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). | ||||
* | Make or_test similar to test, not testlist. | Martin v. Löwis | 2006-02-27 | 1 | -1/+2 |
| | |||||
* | Skip over doc strings. | Martin v. Löwis | 2006-02-27 | 1 | -1/+8 |
| | |||||
* | Handle testlist_safe and or_test like testlist. | Martin v. Löwis | 2006-02-27 | 1 | -2/+2 |
| | |||||
* | Alias non-terminals introduced for backwards compatibility. | Martin v. Löwis | 2006-02-27 | 1 | -0/+3 |
| | |||||
* | Remove unused _callers member. No need for types, use isinstance | Neal Norwitz | 2005-11-25 | 1 | -5/+2 |
| | |||||
* | Stop looping to do nothing, just pass. | Neal Norwitz | 2005-11-25 | 1 | -2/+2 |
| | |||||
* | No need for types, use isinstance | Neal Norwitz | 2005-11-25 | 3 | -9/+6 |
| | |||||
* | Use sorted() builtin | Neal Norwitz | 2005-11-25 | 1 | -10/+5 |
| | |||||
* | Merge ast-branch to head | Jeremy Hylton | 2005-10-20 | 1 | -10/+9 |
| | | | | | | | | | | 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. | ||||
* | PEP 342 implementation. Per Guido's comments, the generator throw() | Phillip J. Eby | 2005-08-02 | 1 | -1/+11 |
| | | | | | method still needs to support string exceptions, and allow None for the third argument. Documentation updates are needed, too. | ||||
* | patch [ 1231538 ] Typo fix in compiler/transformer.py (WalkerEror) | Georg Brandl | 2005-07-02 | 1 | -11/+11 |
| | |||||
* | Fix compiler.ast.flatten function so that it works on lists. | Neil Schemenauer | 2005-06-02 | 1 | -4/+4 |
| | |||||
* | Flush out support for ``class B(): pass`` syntax by adding support to the | Brett Cannon | 2005-04-09 | 1 | -1/+3 |
| | | | | | | 'parser' module and 'compiler' package. Closes patch #1176012. Thanks logistix. | ||||
* | Fix bug | Michael W. Hudson | 2004-11-08 | 1 | -2/+2 |
| | | | | [ 1057835 ] compiler.transformer, "from module import *" | ||||
* | This is jiwon's patch to fix: | Michael W. Hudson | 2004-10-11 | 1 | -1/+6 |
| | | | | [ 1042238 ] Lib/compiler chokes on certain genexps | ||||
* | Whitespace normalization. | Tim Peters | 2004-09-12 | 2 | -10/+10 |
| | |||||
* | Remove debugging print (not triggered by test suite) and add XXX comment ↵ | Jeremy Hylton | 2004-09-07 | 1 | -1/+1 |
| | | | | about how the code should raise a SyntaxError. | ||||
* | compiler.transformer: correct lineno attribute when possible | Jeremy Hylton | 2004-09-07 | 2 | -405/+316 |
| | | | | | | | | | | | | | | | | SF patch #1015989 The basic idea of this patch is to compute lineno attributes for all AST nodes. The actual implementation lead to a lot of restructing and code cleanup. The generated AST nodes now have an optional lineno argument to constructor. Remove the top-level asList(), since it didn't seem to serve any purpose. Add an __iter__ to ast nodes. Use isinstance() instead of explicit type tests. Change transformer to use the new lineno attribute, which replaces three lines of code with one. Use universal newlines so that we can get rid of special-case code for line endings. Use lookup_node() in a few more frequently called, but simple com_xxx methods(). Change string exception to class exception. | ||||
* | SF patch #1007189, multi-line imports, for instance: | Anthony Baxter | 2004-08-31 | 1 | -32/+44 |
| | | | | | "from blah import (foo, bar baz, bongo)" |