Commit message (Collapse) | Author | Age | Files | Lines | |
---|---|---|---|---|---|
* | Add comments | Raymond Hettinger | 2007-12-20 | 1 | -3/+3 |
| | |||||
* | Bigger range for non-extended opargs. | Raymond Hettinger | 2007-12-19 | 1 | -1/+1 |
| | |||||
* | Zap a duplicate line | Raymond Hettinger | 2007-12-19 | 1 | -1/+0 |
| | |||||
* | Give meaning to the oparg for BUILD_MAP: estimated size of the dictionary. | Raymond Hettinger | 2007-12-18 | 1 | -4/+2 |
| | | | | | | | | | | | Allows dictionaries to be pre-sized (upto 255 elements) saving time lost to re-sizes with their attendant mallocs and re-insertions. Has zero effect on small dictionaries (5 elements or fewer), a slight benefit for dicts upto 22 elements (because they had to resize once anyway), and more benefit for dicts upto 255 elements (saving multiple resizes during the build-up and reducing the number of collisions on the first insertions). Beyond 255 elements, there is no addional benefit. | ||||
* | Speed-up dictionary constructor by about 10%. | Raymond Hettinger | 2007-12-18 | 1 | -3/+3 |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | New opcode, STORE_MAP saves the compiler from awkward stack manipulations and specializes for dicts using PyDict_SetItem instead of PyObject_SetItem. Old disassembly: 0 BUILD_MAP 0 3 DUP_TOP 4 LOAD_CONST 1 (1) 7 ROT_TWO 8 LOAD_CONST 2 ('x') 11 STORE_SUBSCR 12 DUP_TOP 13 LOAD_CONST 3 (2) 16 ROT_TWO 17 LOAD_CONST 4 ('y') 20 STORE_SUBSCR New disassembly: 0 BUILD_MAP 0 3 LOAD_CONST 1 (1) 6 LOAD_CONST 2 ('x') 9 STORE_MAP 10 LOAD_CONST 3 (2) 13 LOAD_CONST 4 ('y') 16 STORE_MAP | ||||
* | Fix #1169: remove docstrings in functions for -OO. | Georg Brandl | 2007-09-19 | 1 | -1/+1 |
| | |||||
* | Revert compile.c changes that shouldn't have been included in previous checkin | Nick Coghlan | 2007-08-25 | 1 | -7/+2 |
| | |||||
* | Revert misguided attempt at fixing incompatibility between -m and -i ↵ | Nick Coghlan | 2007-08-25 | 1 | -2/+7 |
| | | | | switches (better fix coming soon) | ||||
* | Fix compile.c so that it records 0.0 and -0.0 as separate constants in a code | Alex Martelli | 2007-08-22 | 1 | -1/+14 |
| | | | | | object's co_consts tuple; add a test to show that the previous behavior (where these two constants were "collapsed" into one) causes serious malfunctioning. | ||||
* | Bug #1722484: remove docstrings again when running with -OO. | Georg Brandl | 2007-06-01 | 1 | -1/+2 |
| | |||||
* | tabify | Jeremy Hylton | 2007-02-27 | 1 | -34/+34 |
| | | | | | Note that ast.c still has a mix of tabs and spaces, because it attempts to use four-space indents for more of the new code. | ||||
* | Fix long-standing bug in name mangling for package imports | Jeremy Hylton | 2007-02-27 | 1 | -2/+12 |
| | | | | Reported by Mike Verdone. | ||||
* | Update comments, remove commented out code. | Neal Norwitz | 2006-10-29 | 1 | -87/+31 |
| | | | | | Move assembler structure next to assembler code to make it easier to move it to a separate file. | ||||
* | Clean up a leftover from old listcomp generation code. | Georg Brandl | 2006-10-29 | 1 | -7/+1 |
| | |||||
* | Fix bug #1565514, SystemError not raised on too many nested blocks. | Neal Norwitz | 2006-10-28 | 1 | -1/+4 |
| | | | | | | | It seems like this should be a different error than SystemError, but I don't have any great ideas and SystemError was raised in 2.4 and earlier. Will backport. | ||||
* | Fix for SF bug 1569998: break permitted inside try. | Jeremy Hylton | 2006-10-04 | 1 | -1/+13 |
| | | | | | | | | The compiler was checking that there was something on the fblock stack, but not that there was a loop on the stack. Fixed that and added a test for the specific syntax error. Bug fix candidate. | ||||
* | Patch #1542451: disallow continue anywhere under a finally | Neal Norwitz | 2006-08-21 | 1 | -4/+9 |
| | | | | | | I'm undecided if this should be backported to 2.5 or 2.5.1. Armin suggested to wait (I'm of the same opinion). Thomas W thinks it's fine to go in 2.5. | ||||
* | Add assert to make Klocwork happy (#276) | Neal Norwitz | 2006-08-21 | 1 | -0/+1 |
| | |||||
* | Move peephole optimizer to separate file. | Jeremy Hylton | 2006-08-21 | 1 | -608/+1 |
| | |||||
* | Even though _Py_Mangle() isn't truly public anyone can call it and | Neal Norwitz | 2006-08-12 | 1 | -2/+2 |
| | | | | | | | | | | there was no verification that privateobj was a PyString. If it wasn't a string, this could have allowed a NULL pointer to creep in below and crash. I wonder if this should be PyString_CheckExact? Must identifiers be strings or can they be subclasses? Klocwork #275 | ||||
* | Bug #1333982: string/number constants were inappropriately stored | Neal Norwitz | 2006-08-04 | 1 | -2/+4 |
| | | | | | in the byte code and co_consts even if they were not used, ie immediately popped off the stack. | ||||
* | Bug #1191458: tracing over for loops now produces a line event | Neal Norwitz | 2006-08-04 | 1 | -7/+46 |
| | | | | | | | | | | | | on each iteration. I'm not positive this is the best way to handle this. I'm also not sure that there aren't other cases where the lnotab is generated incorrectly. It would be great if people that use pdb or tracing could test heavily. Also: * Remove dead/duplicated code that wasn't used/necessary because we already handled the docstring prior to entering the loop. * add some debugging code into the compiler (#if 0'd out). | ||||
* | Add some asserts and update comments | Neal Norwitz | 2006-07-30 | 1 | -0/+1 |
| | |||||
* | If the for loop isn't entered, entryblock will be NULL. If passed | Neal Norwitz | 2006-07-23 | 1 | -0/+2 |
| | | | | | | to stackdepth_walk it will be dereffed. Not sure if I found with failmalloc or Klockwork #55. | ||||
* | Fix more memory allocation issues found with failmalloc. | Neal Norwitz | 2006-07-22 | 1 | -13/+23 |
| | |||||
* | Handle more memory allocation failures without crashing. | Neal Norwitz | 2006-07-21 | 1 | -0/+9 |
| | |||||
* | Bug #1512814, Fix incorrect lineno's when code within a function | Neal Norwitz | 2006-07-16 | 1 | -5/+6 |
| | | | | had more than 255 blank lines. Byte codes need to go first, line #s second. | ||||
* | Bug #1512814, Fix incorrect lineno's when code at module scope | Neal Norwitz | 2006-07-10 | 1 | -1/+9 |
| | | | | started after line 256. | ||||
* | Fix AST compiler bug #1501934: incorrect LOAD/STORE_GLOBAL generation. | Neil Schemenauer | 2006-07-09 | 1 | -1/+2 |
| | |||||
* | Fix indentation of case and a Py_ssize_t issue. | Neal Norwitz | 2006-06-12 | 1 | -2/+2 |
| | |||||
* | Patch #1346214: correctly optimize away "if 0"-style stmts | Georg Brandl | 2006-06-04 | 1 | -14/+29 |
| | | | | (thanks to Neal for review) | ||||
* | Replace Py_BuildValue("OO") by PyTuple_Pack. | Georg Brandl | 2006-05-26 | 1 | -3/+3 |
| | |||||
* | Get rid of __context__, per the latest changes to PEP 343 and python-dev | Guido van Rossum | 2006-05-02 | 1 | -10/+3 |
| | | | | | | | | 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. | ||||
* | Introduce asdl_int_seq, to hold cmpop_ty. | Martin v. Löwis | 2006-04-13 | 1 | -10/+2 |
| | |||||
* | revert - breaks build of Python/ast.c w/ gcc | Skip Montanaro | 2006-04-13 | 1 | -2/+5 |
| | |||||
* | Use union to discriminate pointer types from enum/int types. | Skip Montanaro | 2006-04-13 | 1 | -5/+2 |
| | |||||
* | casting nastiness to make C++ compiler happy | Anthony Baxter | 2006-04-13 | 1 | -2/+10 |
| | |||||
* | per Jeremy's email, remove the _WITH_CAST versions of macros. g++ | Anthony Baxter | 2006-04-12 | 1 | -46/+24 |
| | | | | | still has errors from the casts of asdl_seq_GET to cmpop_ty, but otherwise it's C++ clean. | ||||
* | more low-hanging fruit to make code compile under a C++ compiler. Not | Anthony Baxter | 2006-04-11 | 1 | -54/+85 |
| | | | | | entirely happy with the two new VISIT macros in compile.c, but I couldn't see a better approach. | ||||
* | Use PyObject_* allocator since FutureFeatures is small | Neal Norwitz | 2006-04-10 | 1 | -1/+1 |
| | |||||
* | Fix some warnings on HP-UX when using cc/aCC | Neal Norwitz | 2006-04-10 | 1 | -4/+7 |
| | |||||
* | Generate line number table entries for except handlers. | Jeremy Hylton | 2006-04-04 | 1 | -0/+2 |
| | | | | Re-enable all the tests in test_trace.py except one. Still not sure that these tests test what they used to test, but they pass. One failing test seems to be caused by undocumented line number table behavior in Python 2.4. | ||||
* | Don't abbreviate ABS, use long name ABSOLUTE. | Neal Norwitz | 2006-04-03 | 1 | -2/+2 |
| | |||||
* | Expand comments on line numbers and blocks. | Jeremy Hylton | 2006-04-01 | 1 | -6/+21 |
| | | | | Reorder compiler_set_lineno() call for consistency. | ||||
* | 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 |
| |