summaryrefslogtreecommitdiffstats
path: root/Lib/compiler
Commit message (Collapse)AuthorAgeFilesLines
* Backport r69961 to trunk, replacing JUMP_IF_{TRUE,FALSE} withJeffrey Yasskin2009-02-282-35/+15
| | | | | | POP_JUMP_IF_{TRUE,FALSE} and JUMP_IF_{TRUE,FALSE}_OR_POP. This avoids executing a POP_TOP on each conditional and sometimes allows the peephole optimizer to skip a JUMP_ABSOLUTE entirely. It speeds up list comprehensions significantly.
* Issue #999042: The Python compiler now handles explict global statementsNeil Schemenauer2009-02-073-10/+15
| | | | | correctly (should be assigned using STORE_GLOBAL opcode). This was done by having the system table differentiate between explict and implicit globals.
* Make names generated for 'with' variables match the built-in compiler.Neil Schemenauer2009-02-071-1/+1
|
* Overhaul Lib/compiler block ordering. The previous code was filled withNeil Schemenauer2009-02-062-159/+97
| | | | | | hacks. The new code is based on issue #2472 posted by Antoine Pitrou. I did some further cleanups of the pyassem code and optimized the block ordering pass.
* Issue #2183: Simplify and optimize bytecode for list comprehensions.Antoine Pitrou2008-12-171-11/+1
|
* #4578: fix has_key() usage in compiler package.Georg Brandl2008-12-155-18/+16
|
* follow-up of issue3473: update the compiler package to recognize the new syntax.Amaury Forgeot d'Arc2008-08-201-26/+24
|
* Deprecate the compiler package for removal in 3.0.Brett Cannon2008-05-101-0/+3
|
* Fix test_compiler after adding unicode_literalsNeal Norwitz2008-03-271-1/+2
|
* Fixed compiler module so __future__ print_function is compilable.Eric Smith2008-03-193-2/+5
|
* Speed up with statements by storing the __exit__ method on the stack instead ↵Nick Coghlan2008-03-071-4/+1
| | | | of in a temp variable (bumps the magic number for pyc files)
* Issue 2117. Update compiler module to handle class decorators.Facundo Batista2008-02-252-2/+18
| | | | Thanks Thomas Herve
* Patch #2167 from calvin: Remove unused importsChristian Heimes2008-02-231-1/+0
|
* Replaced import of the 'new' module with 'types' module and added a ↵Christian Heimes2007-11-271-2/+2
| | | | deprecation warning to the 'new' module.
* Backport PEP 3110's new 'except' syntax to 2.6.Collin Winter2007-05-181-1/+1
|
* Patch #1638243: the compiler package is now able to correctly compileGeorg Brandl2007-01-272-1/+3
| | | | | a with statement; previously, executing code containing a with statement compiled by the compiler package crashed the interpreter.
* Remove trailing comma.Georg Brandl2006-10-291-1/+1
|
* Bug #1586448: the compiler module now emits the same bytecode forGeorg Brandl2006-10-291-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 beNeil Schemenauer2006-08-163-9/+16
| | | | generated for generator expressions.
* Fix the 'compiler' package to generate correct code for MAKE_CLOSURE.Neil Schemenauer2006-08-041-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 Brandl2006-07-291-7/+0
| | | | test_compiler now passes again.
* Bug #1441397: The compiler module now recognizes module and functionGeorg Brandl2006-07-291-0/+1
| | | | docstrings correctly as it did in Python 2.4.
* Whitespace normalization.Tim Peters2006-06-271-1/+1
|
* Set lineno correctly on list, tuple and dict literals.Georg Brandl2006-06-221-5/+5
|
* fix [ 1509132 ] compiler module builds incorrect AST for TryExceptFinallyGeorg Brandl2006-06-211-18/+23
|
* Fix errors found by pycheckerNeal Norwitz2006-06-112-3/+1
|
* Bug #1385040: don't allow "def foo(a=1, b): pass" in the compiler package.Georg Brandl2006-05-031-7/+5
|
* Get rid of __context__, per the latest changes to PEP 343 and python-devGuido van Rossum2006-05-021-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 importsNeal Norwitz2006-04-033-6/+6
|
* Teach the compiler module about augmented assignment to tuple subscriptsNick Coghlan2006-03-141-4/+2
|
* Um, I thought I'd already checked this in.Guido van Rossum2006-03-102-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 Peters2006-03-041-3/+3
|
* SF bug 1442442: LIST_APPEND optimization got lost in the AST merge.Neal Norwitz2006-03-031-0/+1
| | | | Add it back.
* Fix compiler breakage related to absolute importsNeal Norwitz2006-03-031-2/+2
|
* Hopefully this removes all vestiges of CO_GENERATOR_ALLOWED that canNeal Norwitz2006-03-032-4/+2
| | | | be removed in 2.x.
* Add support for absolute/relative imports and if/else expressions:Thomas Wouters2006-03-035-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 Rossum2006-03-021-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 byThomas Wouters2006-02-281-1/+2
| | | | Neal.
* Whitespace normalization.Tim Peters2006-02-281-3/+3
|
* Forgot to explain the effect of the new opcode.Guido van Rossum2006-02-281-0/+1
| | | | Sigh -- we really should have one place for all opcode metadata.
* Update the compiler package to compile the with-statement.Guido van Rossum2006-02-282-0/+62
| | | | Jeremy, please review!
* PEP 343 -- the with-statement.Guido van Rossum2006-02-271-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öwis2006-02-271-1/+2
|
* Skip over doc strings.Martin v. Löwis2006-02-271-1/+8
|
* Handle testlist_safe and or_test like testlist.Martin v. Löwis2006-02-271-2/+2
|
* Alias non-terminals introduced for backwards compatibility.Martin v. Löwis2006-02-271-0/+3
|
* Remove unused _callers member. No need for types, use isinstanceNeal Norwitz2005-11-251-5/+2
|
* Stop looping to do nothing, just pass.Neal Norwitz2005-11-251-2/+2
|
* No need for types, use isinstanceNeal Norwitz2005-11-253-9/+6
|
* Use sorted() builtinNeal Norwitz2005-11-251-10/+5
|