summaryrefslogtreecommitdiffstats
path: root/Objects/codeobject.c
Commit message (Collapse)AuthorAgeFilesLines
* Issue #6042:Jeffrey Yasskin2009-05-231-132/+8
| | | | | | | | | | | | | | | lnotab-based tracing is very complicated and isn't documented very well. There were at least 3 comment blocks purporting to document co_lnotab, and none did a very good job. This patch unifies them into Objects/lnotab_notes.txt which tries to completely capture the current state of affairs. I also discovered that we've attached 2 layers of patches to the basic tracing scheme. The first layer avoids jumping to instructions that don't start a line, to avoid problems in if statements and while loops. The second layer discovered that jumps backward do need to trace at instructions that don't start a line, so it added extra lnotab entries for 'while' and 'for' loops, and added a special case for backward jumps within the same line. I replaced these patches by just treating forward and backward jumps differently.
* PyCode_NewEmpty:Jeffrey Yasskin2009-05-081-0/+46
| | | | | | | | Most uses of PyCode_New found by http://www.google.com/codesearch?q=PyCode_New are trying to build an empty code object, usually to put it in a dummy frame object. This patch adds a PyCode_NewEmpty wrapper which lets the user specify just the filename, function name, and first line number, instead of also requiring lots of code internals.
* This reverts r63675 based on the discussion in this thread:Gregory P. Smith2008-06-091-22/+22
| | | | | | | http://mail.python.org/pipermail/python-dev/2008-June/079988.html Python 2.6 should stick with PyString_* in its codebase. The PyBytes_* names in the spirit of 3.0 are available via a #define only. See the email thread.
* Renamed PyString to PyBytesChristian Heimes2008-05-261-22/+22
|
* A little reformating of Py3k warningsBenjamin Peterson2008-04-271-2/+2
|
* Use PyErr_WarnPy3k throughoutBenjamin Peterson2008-04-271-4/+2
|
* Make Py3k warnings consistent w.r.t. punctuation; also respect theGeorg Brandl2008-03-251-3/+6
| | | | EOL 80 limit and supply more alternatives in warning messages.
* Add py3k warnings for code and method inequality comparisons. This should ↵Steven Bethard2008-03-181-1/+67
| | | | resolve issue 2373. The codeobject.c and methodobject.c changes are both just backports of the Python 3 code.
* PEP 3123: Provide forward compatibility with Python 3.0, while keepingMartin v. Löwis2007-07-211-2/+1
| | | | | backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and PyVarObject_HEAD_INIT.
* Fix uninitialized memory read reported by Valgrind when running doctest.Neal Norwitz2006-07-121-0/+1
| | | | This could happen if size == 0.
* Merge from rjones-funccall branch.Richard Jones2006-05-231-0/+3
| | | | | | Applied patch zombie-frames-2.diff from sf patch 876206 with updates for Python 2.5 and also modified to retain the free_list to avoid the 67% slow-down in pybench recursion test. 5% speed up in function call pybench.
* Refactor: Move code that uses co_lnotab from ceval to codeobjectJeremy Hylton2006-04-181-0/+133
|
* Merge ssize_t branch.Martin v. Löwis2006-02-151-3/+3
|
* Merge ast-branch to headJeremy Hylton2005-10-201-0/+453
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.