| Commit message (Collapse) | Author | Age | Files | Lines |
|
|
|
| |
between CF objects and their Python representation. Fixes 734695.
|
|
|
|
| |
Update error message. Hopefully this is clearer to some people.
|
|
|
|
| |
Remove comment about how code used to work.
|
|
|
|
|
|
|
| |
to do.
XXX Please be careful when checking in patches to avoid checking in
junk that explains what the patched code used to do.
|
|
|
|
|
|
| |
The compiler was reseting the list comprehension tmpname counter for each function, but the symtable was using the same counter for the entire module. Repair by move tmpname into the symtable entry.
Bugfix candidate.
|
|
|
|
|
| |
about a decade ago. Put the code still allowing for it in cmp_type()
out of its lonely misery.
|
|
|
|
| |
riscospath.extsep, and use os.extsep throughout.
|
|
|
|
| |
the terminal encoding on Windows and Unix.
|
| |
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
| |
[ 708901 ] Lineno calculation sometimes broken
A one line patch to compile.c and a rather-more-than-one-line patch
to test_dis. Hey ho.
Possibly a backport candidate -- tho' lnotab is less used in 2.2...
|
|
|
|
|
|
| |
[ 729622 ] line tracing hook errors
with massaging from me to integrate test into test suite.
|
|
|
|
| |
The additional code complexity and new NOP opcode were not worth it.
|
| |
|
| |
|
|
|
|
| |
use the API.
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
* Can now test for basic blocks.
* Optimize inverted comparisions.
* Optimize unary_not followed by a conditional jump.
* Added a new opcode, NOP, to keep code size constant.
* Applied NOP to previous transformations where appropriate.
Note, the NOP would not be necessary if other functions were
added to re-target jump addresses and update the co_lnotab mapping.
That would yield slightly faster and cleaner bytecode at the
expense of optimizer simplicity and of keeping it decoupled
from the line-numbering structure.
|
|
|
|
|
|
|
| |
particular leaving the traceback object (and everything reachable
from it) alive throughout shutdown. The patch is mostly from Guido.
Bugfix candidate.
|
| |
|
| |
|
| |
|
|
|
|
| |
changes stay.
|
| |
|
|
|
|
| |
not 'K'.
|
|
|
|
| |
Untested, but at least it still compiles.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
new line.
New pvt API function _Py_PrintReferenceAddresses(): Prints only the
addresses and refcnts of the live objects. This is always safe to call,
because it has no dependence on Python's C API.
Py_Finalize(): If envar PYTHONDUMPREFS is set, call (the new)
_Py_PrintReferenceAddresses() right before dumping final pymalloc stats.
We can't print the reprs of the objects here because too much of the
interpreter has been shut down. You need to correlate the addresses
displayed here with the object reprs printed by the earlier
PYTHONDUMPREFS call to _Py_PrintReferences().
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
New functions:
unsigned long PyInt_AsUnsignedLongMask(PyObject *);
unsigned PY_LONG_LONG) PyInt_AsUnsignedLongLongMask(PyObject *);
unsigned long PyLong_AsUnsignedLongMask(PyObject *);
unsigned PY_LONG_LONG) PyLong_AsUnsignedLongLongMask(PyObject *);
New and changed format codes:
b unsigned char 0..UCHAR_MAX
B unsigned char none **
h unsigned short 0..USHRT_MAX
H unsigned short none **
i int INT_MIN..INT_MAX
I * unsigned int 0..UINT_MAX
l long LONG_MIN..LONG_MAX
k * unsigned long none
L long long LLONG_MIN..LLONG_MAX
K * unsigned long long none
Notes:
* New format codes.
** Changed from previous "range-and-a-half" to "none"; the
range-and-a-half checking wasn't particularly useful.
New test test_getargs2.py, to verify all this.
|
|
|
|
|
| |
- Call this in Py_Finalize().
- Expand the Misc/NEWS text on PY_LONG_LONG.
|
|
|
|
| |
wrapper around err_input().
|
| |
|
|
|
|
|
|
|
|
| |
PYTHONDUMPREFS output after most teardown. Attempts to use
PYTHONDUMPREFS with the Zope3 test suite died with Py_FatalError(),
since _Py_PrintReferences() can end up executing arbitrary Python code
(for objects that override __repr__), and that requires an intact
interpreter.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
even farther down, to just before the call to
_PyObject_DebugMallocStats(). This required the following changes:
- pystate.c, PyThreadState_GetDict(): changed not to raise an
exception or issue a fatal error when no current thread state is
available, but simply return NULL without raising an exception
(ever).
- object.c, Py_ReprEnter(): when PyThreadState_GetDict() returns NULL,
don't raise an exception but return 0. This means that when
printing a container that's recursive, printing will go on and on
and on. But that shouldn't happen in the case we care about (see
first bullet).
- Updated Misc/NEWS and Doc/api/init.tex to reflect changes to
PyThreadState_GetDict() definition.
|
|
|
|
|
| |
prevents it from showing stuff (like codec state) that is cleared when
the interpreter state is cleared.
|
| |
|
|
|
|
|
|
| |
to cover the case for: "x,y,z=1,2,3". Gives a 30% speed-up.
Also, added FOR_ITER to the list of opcodes that can jump.
|
|
|
|
|
| |
unexpected type, report the actual type rather than 'float'. (It's
hard to even reach this code with a float. :-)
|
|
|
|
|
|
|
| |
the code erroneously decrefed the istep argument in an error case. This
caused a co_consts tuple to lose a float constant prematurely, which
eventually caused gc to try executing static data in floatobject.c (don't
ask <wink>). So reworked this extensively to ensure refcount correctness.
|
|
|
|
|
|
|
| |
- range() now works even if the arguments are longs with magnitude
larger than sys.maxint, as long as the total length of the sequence
fits. E.g., range(2**100, 2**101, 2**100) is the following list:
[1267650600228229401496703205376L]. (SF patch #707427.)
|
| |
|
|
|
|
|
|
|
|
| |
return. Setting an exception can mess with the exception state, and
continuing is definitely wrong (since type is dereferenced later on).
Some code that calls this seems to be prepared for a NULL exception
type, so let's be safe rather than sorry and simply assume there's
nothing to normalize in this case.
|
|
|
|
|
|
| |
recursively.
- pdb has a new command, "debug", which lets you step through
arbitrary code from the debugger's (pdb) prompt.
|
| |
|
| |
|
| |
|
|
|
|
|
|
|
|
|
|
| |
Adds a single function to improve generated bytecode. Has a single line
attachment point, so it is completely de-coupled from both the compiler
and ceval.c.
Makes three simple transforms that do not require a basic block analysis
or re-ordering of code. Gives improved timings on pystone, pybench,
and any code using either "while 1" or "x,y=y,x".
|
|
|
|
|
|
| |
in normal cases, and also in error cases.
Bugfix candidate.
|