summaryrefslogtreecommitdiffstats
path: root/Lib/compiler
Commit message (Collapse)AuthorAgeFilesLines
* 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
|
* Merge ast-branch to headJeremy Hylton2005-10-201-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. Eby2005-08-021-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 Brandl2005-07-021-11/+11
|
* Fix compiler.ast.flatten function so that it works on lists.Neil Schemenauer2005-06-021-4/+4
|
* Flush out support for ``class B(): pass`` syntax by adding support to theBrett Cannon2005-04-091-1/+3
| | | | | | 'parser' module and 'compiler' package. Closes patch #1176012. Thanks logistix.
* Fix bugMichael W. Hudson2004-11-081-2/+2
| | | | [ 1057835 ] compiler.transformer, "from module import *"
* This is jiwon's patch to fix:Michael W. Hudson2004-10-111-1/+6
| | | | [ 1042238 ] Lib/compiler chokes on certain genexps
* Whitespace normalization.Tim Peters2004-09-122-10/+10
|
* Remove debugging print (not triggered by test suite) and add XXX comment ↵Jeremy Hylton2004-09-071-1/+1
| | | | about how the code should raise a SyntaxError.
* compiler.transformer: correct lineno attribute when possibleJeremy Hylton2004-09-072-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 Baxter2004-08-311-32/+44
| | | | | "from blah import (foo, bar baz, bongo)"
* Whitespace normalization.Tim Peters2004-08-201-1/+1
|
* This is Mark Russell's patch:Michael W. Hudson2004-08-172-13/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | [ 1009560 ] Fix @decorator evaluation order From the description: Changes in this patch: - Change Grammar/Grammar to require newlines between adjacent decorators. - Fix order of evaluation of decorators in the C (compile.c) and python (Lib/compiler/pycodegen.py) compilers - Add better order of evaluation check to test_decorators.py (test_eval_order) - Update the decorator documentation in the reference manual (improve description of evaluation order and update syntax description) and the comment: Used Brett's evaluation order (see http://mail.python.org/pipermail/python-dev/2004-August/047835.html) (I'm checking this in for Anthony who was having problems getting SF to talk to him)
* SF patch 836879.Jeremy Hylton2004-08-071-21/+19
| | | | Don't generate code for asserts in -O mode.
* Whitespace normalization.Tim Peters2004-08-043-9/+9
|
* PEP-0318, @decorator-style. In Guido's words:Anthony Baxter2004-08-024-636/+723
| | | | | "@ seems the syntax that everybody can hate equally" Implementation by Mark Russell, from SF #979728.
* this is patchMichael W. Hudson2004-07-121-1/+1
| | | | | | | | [ 988698 ] compiler.transformer fix for (a, b) = 1, 2 fixing bug [ 988613 ] compiler.transformer and tuple unpacking
* Whitespace normalization.Tim Peters2004-07-072-4/+4
|
* SF patch #872326: Generator expression implementationRaymond Hettinger2004-05-194-0/+259
| | | | | | | | | | | | | | (Code contributed by Jiwon Seo.) The documentation portion of the patch is being re-worked and will be checked-in soon. Likewise, PEP 289 will be updated to reflect Guido's rationale for the design decisions on binding behavior (as described in in his patch comments and in discussions on python-dev). The test file, test_genexps.py, is written in doctest format and is meant to exercise all aspects of the the patch. Further additions are welcome from everyone. Please stress test this new feature as much as possible before the alpha release.
* Remove unused instance attributes.Neil Schemenauer2004-03-211-2/+0
|
* Fix SF bug [ 788011 ] compiler.compileFile fails on csv.pyJeremy Hylton2003-08-281-1/+6
| | | | Bug fix candidate.
* Comment typo fixesAndrew M. Kuchling2003-08-112-2/+2
|
* Jacob Hallen cornered me here at EuroPython and got me to look atMichael W. Hudson2003-06-271-1/+5
| | | | | | | | | | patch: [ 750008 ] 'compiler' module bug with 'import foo.bar as baz' which I'm now checking in. after import foo.bar as baz, baz would refer to foo.
* SF patch #701494: more apply removalsRaymond Hettinger2003-04-061-1/+1
|
* Whitespace normalization.Tim Peters2003-03-071-1/+1
|
* Remove debugging prints.Michael W. Hudson2003-01-031-2/+0
|