Commit message (Collapse) | Author | Age | Files | Lines | ||
---|---|---|---|---|---|---|
... | ||||||
* | | Add line explaining the "%sort" test. | Tim Peters | 2013-08-22 | 1 | -0/+1 | |
|\ \ | |/ | ||||||
| * | Add line explaining the "%sort" test. | Tim Peters | 2013-08-22 | 1 | -0/+1 | |
| | | | | | | | | (grafted from 1ea833ecaf5a9d43a886e9e73b4e2551d0d5b548) | |||||
* | | Issue 18797: Remove unneeded refcount adjustments for dummy objects. | Raymond Hettinger | 2013-08-22 | 1 | -16/+6 | |
| | | | | | | | | It suffices to keep just one reference when the object is created. | |||||
* | | Hoist the global dummy lookup out of the inner loop for set_merge(). | Raymond Hettinger | 2013-08-21 | 1 | -1/+3 | |
| | | ||||||
* | | Remove a redundant hash table probe (this was artifact from an earlier draft ↵ | Raymond Hettinger | 2013-08-21 | 1 | -11/+0 | |
| | | | | | | | | of the patch). | |||||
* | | Issue 18772: Restore set dummy object back to unicode and restore the ↵ | Raymond Hettinger | 2013-08-21 | 1 | -4/+4 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | identity checks in lookkey(). The Gdb prettyprint plugin depended on the dummy object being displayable. Other solutions besides a unicode object are possible. For now, get it back up and running. The identity checks in lookkey() need to be there to prevent the dummy object from leaking through Py_RichCompareBool() into user code in the rare circumstance where the dummy's hash value exactly matches the hash value of the actual key being looked up. | |||||
* | | Issue18771: Reduce the cost of hash collisions for set objects. | Raymond Hettinger | 2013-08-19 | 1 | -20/+86 | |
| | | ||||||
* | | Remove the else-clause because the conditions are no longer mutually exclusive. | Raymond Hettinger | 2013-08-17 | 1 | -1/+1 | |
| | | ||||||
* | | Use a known unique object for the dummy entry. | Raymond Hettinger | 2013-08-17 | 1 | -25/+20 | |
| | | | | | | | | | | This lets us run PyObject_RichCompareBool() without first needing to check whether the entry is a dummy. | |||||
* | | Issue #18701: Remove support of old CPython versions (<3.0) from C code. | Serhiy Storchaka | 2013-08-16 | 1 | -5/+0 | |
| | | ||||||
* | | Hoist the global "dummy" lookup outside of the reinsertion loop. | Raymond Hettinger | 2013-08-15 | 1 | -1/+3 | |
| | | ||||||
* | | merge | Raymond Hettinger | 2013-08-14 | 1 | -9/+0 | |
|\ \ | |/ | ||||||
| * | Issue 18719: Remove a false optimization | Raymond Hettinger | 2013-08-14 | 1 | -9/+0 | |
| | | | | | | | | | | | | | | | | | | | | Remove an unused early-out test from the critical path for dict and set lookups. When the strings already have matching lengths, kinds, and hashes, there is no additional information gained by checking the first characters (the probability of a mismatch is already known to be less than 1 in 2**64). | |||||
| * | Silence compiler warning for an unused declaration | Raymond Hettinger | 2013-08-04 | 1 | -1/+0 | |
| | | ||||||
* | | Issue #18722: Remove uses of the "register" keyword in C code. | Antoine Pitrou | 2013-08-13 | 20 | -196/+196 | |
| | | ||||||
* | | Replace outdated optimization with clearer code that compiles better. | Raymond Hettinger | 2013-08-06 | 1 | -3/+3 | |
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Letting the compiler decide how to optimize the multiply by five gives it the freedom to make better choices for the best technique for a given target machine. For example, GCC on x86_64 produces a little bit better code: Old-way (3 steps with a data dependency between each step): shrq $5, %r13 leaq 1(%rbx,%r13), %rax leaq (%rax,%rbx,4), %rbx New-way (3 steps with no dependency between the first two steps which can be run in parallel): leaq (%rbx,%rbx,4), %rax # i*5 shrq $5, %r13 # perturb >>= PERTURB_SHIFT leaq 1(%r13,%rax), %rbx # 1 + perturb + i*5 | |||||
* | | Issue #17934: Add a clear() method to frame objects, to help clean up ↵ | Antoine Pitrou | 2013-08-05 | 2 | -5/+31 | |
| | | | | | | | | expensive details (local variables) and break reference cycles. | |||||
* | | merge | Raymond Hettinger | 2013-08-04 | 1 | -1/+1 | |
|\ \ | |/ | ||||||
| * | Silence compiler warning about an uninitialized variable | Raymond Hettinger | 2013-08-04 | 1 | -1/+1 | |
| | | ||||||
* | | Issue #16741: Fix an error reporting in int(). | Serhiy Storchaka | 2013-08-03 | 2 | -52/+64 | |
|\ \ | |/ | ||||||
| * | Issue #16741: Fix an error reporting in int(). | Serhiy Storchaka | 2013-08-03 | 2 | -51/+67 | |
| | | ||||||
* | | Minor consistency fixes for some longobject.c exception messages: | Mark Dickinson | 2013-08-03 | 1 | -4/+4 | |
| | | | | | | | | | | | | - replace 'long int' / 'long' by 'int' - fix capitalization of "Python" in PyLong_AsUnsignedLong - "is too large" -> "too large", for consistency with other messages. | |||||
* | | Issue #18214: Improve finalization of Python modules to avoid setting their ↵ | Antoine Pitrou | 2013-07-31 | 1 | -8/+21 | |
| | | | | | | | | globals to None, in most cases. | |||||
* | | Issue #18112: PEP 442 implementation (safe object finalization). | Antoine Pitrou | 2013-07-30 | 3 | -123/+147 | |
| | | ||||||
* | | Issue #18520: Fix _PyDict_GetItemId(), suppress _PyUnicode_FromId() error | Victor Stinner | 2013-07-22 | 1 | -1/+3 | |
| | | | | | | | | | | As PyDict_GetItem(), _PyDict_GetItemId() suppresses all errors that may occur, for historical reasons. | |||||
* | | Issue #18520: Fix PyFunction_NewWithQualName() error handling | Victor Stinner | 2013-07-22 | 1 | -10/+9 | |
| | | ||||||
* | | Reindent PyFunction_NewWithQualName() | Victor Stinner | 2013-07-22 | 1 | -49/+49 | |
| | | ||||||
* | | Issue #18520: Add a new PyStructSequence_InitType2() function, same than | Victor Stinner | 2013-07-22 | 3 | -15/+37 | |
| | | | | | | | | | | | | | | | | PyStructSequence_InitType() except that it has a return value (0 on success, -1 on error). * PyStructSequence_InitType2() now raises MemoryError on memory allocation failure * Fix also some calls to PyDict_SetItemString(): handle error | |||||
* | | Propagate error when PyByteArray_Resize() fails in bytearray_translate() | Christian Heimes | 2013-07-21 | 1 | -1/+4 | |
|\ \ | |/ | | | | | CID 715334 | |||||
| * | Propagate error when PyByteArray_Resize() fails in bytearray_translate() | Christian Heimes | 2013-07-21 | 1 | -1/+4 | |
| | | | | | | | | CID 715334 | |||||
* | | Check return value of PyType_Ready(&EncodingMapType) | Christian Heimes | 2013-07-20 | 1 | -1/+2 | |
|\ \ | |/ | | | | | CID 486654 | |||||
| * | Check return value of PyType_Ready(&EncodingMapType) | Christian Heimes | 2013-07-20 | 1 | -1/+2 | |
| | | | | | | | | CID 486654 | |||||
* | | Issue #18327: Fix argument order in call to compatible_for_assignment(oldto, ↵ | Christian Heimes | 2013-07-20 | 1 | -1/+1 | |
| | | | | | | | | | | | | newto, attr). The fix only affects the error message of __class__ assignment. CID 983564 | |||||
* | | Issue #18408: Fix list_ass_slice(), handle list_resize() failure | Victor Stinner | 2013-07-19 | 1 | -3/+8 | |
| | | | | | | | | | | I tested the patch manually by injecting a fault using gdb: list items are correctly restored on failure. | |||||
* | | Issue #18408: PyObject_Str(), PyObject_Repr() and type_call() now fail with an | Victor Stinner | 2013-07-17 | 2 | -0/+23 | |
| | | | | | | | | | | | | | | assertion error if they are called with an exception set (PyErr_Occurred()). As PyEval_EvalFrameEx(), they may clear the current exception and so the caller looses its exception. | |||||
* | | Issue #18408: Fix dict_repr(), don't call PyObject_Repr() with an exception set | Victor Stinner | 2013-07-17 | 1 | -0/+3 | |
| | | | | | | | | | | PyObject_Repr() can removes the current exception. For example, module_repr() calls PyErr_Clear() if calling loader.module_repr(mod) failed. | |||||
* | | longobject.c: add an assertion to ensure that MEDIUM_VALUE() is only called on | Victor Stinner | 2013-07-17 | 1 | -1/+2 | |
| | | | | | | | | small integers (0 or 1 digit) | |||||
* | | Issue #18408: Rewrite NEGATE() macro in longobject.c to handle ↵ | Victor Stinner | 2013-07-17 | 1 | -24/+51 | |
| | | | | | | | | PyLong_FromLong() failure | |||||
* | | Issue #18408: Fix PyType_Ready(), handle _PyDict_SetItemId() failure | Victor Stinner | 2013-07-17 | 1 | -3/+7 | |
| | | ||||||
* | | Issue #18408: Fix Py_ReprEnter(), handle PyList_Append() failure | Victor Stinner | 2013-07-17 | 1 | -1/+2 | |
| | | ||||||
* | | Issue #18408: Fix listpop(), handle list_ass_slice() failure | Victor Stinner | 2013-07-17 | 1 | -6/+4 | |
| | | ||||||
* | | Issue #18408: Fix structseq_reduce(), handle PyDict_SetItemString() failure | Victor Stinner | 2013-07-17 | 1 | -11/+13 | |
| | | ||||||
* | | Close #18469: Replace PyDict_GetItemString() with _PyDict_GetItemId() in ↵ | Victor Stinner | 2013-07-16 | 1 | -5/+20 | |
| | | | | | | | | | | | | | | | | | | | | | | | | structseq.c _PyDict_GetItemId() is more efficient: it only builds the Unicode string once. Identifiers (dictionary keys) are now created at Python initialization, and if the creation failed, Python does exit with a fatal error. Before, PyDict_GetItemString() failure was not handled: structseq_new() could call PyObject_GC_NewVar() with a negative size, and structseq_dealloc() could also crash. | |||||
* | | Cleanup type_call() to ease debug | Victor Stinner | 2013-07-16 | 1 | -4/+6 | |
| | | | | | | | | | | | | It was easy to miss the call to type->tp_init because it was done in a long conditional expression. Split the long expression in multiple lines to make the debug step by step easier. | |||||
* | | Issue #18408: Py_ReprLeave() now saves/restores the current exception, | Victor Stinner | 2013-07-16 | 1 | -2/+11 | |
| | | | | | | | | and ignores exceptions raised during the call | |||||
* | | Issue #18408: dict_new() now fails on new_keys_object() error | Victor Stinner | 2013-07-16 | 1 | -10/+9 | |
| | | | | | | | | Pass the MemoryError exception to the caller, instead of using empty keys. | |||||
* | | Cleanup dictobject.c | Victor Stinner | 2013-07-16 | 1 | -17/+19 | |
| | | ||||||
* | | Issue #18408: Fix PyDict_GetItemString(), suppress PyUnicode_FromString() error | Victor Stinner | 2013-07-16 | 1 | -1/+3 | |
| | | | | | | | | | | As PyDict_GetItem(), PyDict_GetItemString() suppresses all errors that may occur for historical reasons. | |||||
* | | Issue #18408: Fix list.extend(), handle list_resize() failure | Victor Stinner | 2013-07-16 | 1 | -2/+4 | |
| | | ||||||
* | | Issue #18408: add more assertions on PyErr_Occurred() in ceval.c to detect bugs | Victor Stinner | 2013-07-15 | 1 | -2/+1 | |
| | | | | | | | | earlier |