Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | 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 |
| | |||||
* | Have set conversion replace existing constant if not used elsewhere. | Raymond Hettinger | 2005-02-09 | 1 | -1/+7 |
| | |||||
* | Adopt Skip's idea to optimize lists of constants in the context | Raymond Hettinger | 2005-02-07 | 1 | -7/+13 |
| | | | | of a "in" or "not in" test. | ||||
* | Transform "x in (1,2,3)" to "x in frozenset([1,2,3])". | Raymond Hettinger | 2005-02-06 | 1 | -1/+48 |
| | | | | | Inspired by Skip's idea to recognize the throw-away nature of sequences in this context and to transform their type to one with better performance. | ||||
* | Do not fold a constant if a large sequence will result. | Raymond Hettinger | 2005-01-26 | 1 | -5/+15 |
| | | | | Saves space in the presence of code like: (None,)*10000 | ||||
* | Re-running python with/without the -Qnew flag uses incorrectly optimized | Armin Rigo | 2005-01-07 | 1 | -6/+3 |
| | | | | | bytecodes from the previously saved .pyc files. Fixed by disabling the static optimization of BINARY_DIVIDE between two constants. | ||||
* | Teach the peephole optimizer to fold simple constant expressions. | Raymond Hettinger | 2005-01-02 | 1 | -1/+118 |
| | |||||
* | SF patch 1025636: Check for NULL returns in compile.c:com_import_stmt | Jeremy Hylton | 2004-11-07 | 1 | -4/+14 |
| | | | | There is no test for this change, because there is no way to provoke memory errors on demand. Test suite passes, though. | ||||
* | Maintain peepholer's cumlc invariant by updating the running total | Raymond Hettinger | 2004-11-02 | 1 | -0/+4 |
| | | | | | | everytime a LOAD_CONSTANT is encountered, created, or overwritten. Added two tests to cover cases affected by the patch. | ||||
* | Simplify and future proof NOP counting in the peepholer. | Raymond Hettinger | 2004-11-01 | 1 | -13/+6 |
| | | | | No longer assumes that the input is NOP free. | ||||
* | Fixed a comment and added another one. | Armin Rigo | 2004-10-30 | 1 | -1/+4 |
| | |||||
* | Adopt some peepholer suggestions from Armin Rigo: | Raymond Hettinger | 2004-10-30 | 1 | -15/+20 |
| | | | | | | | | * Use simpler, faster two pass algorithm for markblocks(). * Free the blocks variable if not NULL and exiting without change. * Verify that the rest of the compiler has not set an exception. * Make the test for tuple of constants less restrictive. * Embellish the comment for chained conditional jumps. | ||||
* | SF bug #1053819: Segfault in tuple_of_constants | Raymond Hettinger | 2004-10-26 | 1 | -1/+9 |
| | | | | | | | Peepholer could be fooled into misidentifying a tuple_of_constants. Added code to count consecutive occurrences of LOAD_CONST. Use the count to weed out the misidentified cases. Added a unittest. | ||||
* | SF bug #1048870: call arg of lambda not updating | Raymond Hettinger | 2004-10-24 | 1 | -0/+2 |
| | |||||
* | Improve error message for augmented assignments to genexps or listcomps. | Raymond Hettinger | 2004-09-29 | 1 | -2/+2 |
| | | | | | Rather than introduce new logic, took the approach of making the message itself more general. | ||||
* | Fix two erroneous error messages. | Raymond Hettinger | 2004-09-29 | 1 | -2/+2 |
| | |||||
* | Replaced a test with an assertion. | Raymond Hettinger | 2004-09-28 | 1 | -3/+1 |
| | | | | (Suggested by Michael Hudson.) |