summaryrefslogtreecommitdiff
path: root/Objects/codeobject.c
AgeCommit message (Collapse)AuthorLines
2018-07-31[2.7] bpo-34234: Use _PyAnyInt_Check() and _PyAnyInt_CheckExact(). (GH-8479)Serhiy Storchaka-4/+3
2016-11-09Issue #27942: Fix memory leak in codeobject.cYury Selivanov-0/+2
2016-10-08Silenced compiler warnings.Serhiy Storchaka-1/+0
2016-10-04Issue #28350: String constants with null character no longer interned.Serhiy Storchaka-5/+8
2016-09-30Issue #27942: String constants now interned recursively in tuples and ↵Serhiy Storchaka-9/+45
frozensets.
2016-09-07Issue #27895: Spelling fixes (Contributed by Ville Skyttä).Martin Panter-1/+1
2016-04-15Correct “an” → “a” with “Unicode”, “user”, “UTF”, etcMartin Panter-1/+1
This affects documentation and code comments.
2016-01-22code_richcompare() now uses the constants typesVictor Stinner-1/+143
Issue #25843: When compiling code, don't merge constants if they are equal but have a different types. For example, "f1, f2 = lambda: 1, lambda: 1.0" is now correctly compiled to two different functions: f1() returns 1 (int) and f2() returns 1.0 (int), even if 1 and 1.0 are equal. Add a new _PyCode_ConstantKey() private function.
2010-05-09Untabify C files. Will watch buildbots.Antoine Pitrou-448/+448
2010-03-18Add support for weak references to code objects. This will be used by an ↵Collin Winter-2/+5
optimization in the incoming Python 3 JIT. Patch by Reid Kleckner!
2009-05-23Issue #6042:Jeffrey Yasskin-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.
2009-05-08PyCode_NewEmpty:Jeffrey Yasskin-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.
2008-06-09This reverts r63675 based on the discussion in this thread:Gregory P. Smith-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.
2008-05-26Renamed PyString to PyBytesChristian Heimes-22/+22
2008-04-27A little reformating of Py3k warningsBenjamin Peterson-2/+2
2008-04-27Use PyErr_WarnPy3k throughoutBenjamin Peterson-4/+2
2008-03-25Make Py3k warnings consistent w.r.t. punctuation; also respect theGeorg Brandl-3/+6
EOL 80 limit and supply more alternatives in warning messages.
2008-03-18Add py3k warnings for code and method inequality comparisons. This should ↵Steven Bethard-1/+67
resolve issue 2373. The codeobject.c and methodobject.c changes are both just backports of the Python 3 code.
2007-07-21PEP 3123: Provide forward compatibility with Python 3.0, while keepingMartin v. Löwis-2/+1
backwards compatibility. Add Py_Refcnt, Py_Type, Py_Size, and PyVarObject_HEAD_INIT.
2006-07-12Fix uninitialized memory read reported by Valgrind when running doctest.Neal Norwitz-0/+1
This could happen if size == 0.
2006-05-23Merge from rjones-funccall branch.Richard Jones-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.
2006-04-18Refactor: Move code that uses co_lnotab from ceval to codeobjectJeremy Hylton-0/+133
2006-02-15Merge ssize_t branch.Martin v. Löwis-3/+3
2005-10-20Merge ast-branch to headJeremy Hylton-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.