summaryrefslogtreecommitdiffstats
path: root/Objects
Commit message (Collapse)AuthorAgeFilesLines
* PyCFunction_Call() now calls _PyCFunction_FastCallDict()Victor Stinner2017-01-181-70/+5
| | | | | | | | | | Issue #29259. We had 3 versions of similar code: * PyCFunction_Call() * _PyCFunction_FastCallDict() * _PyCFunction_FastCallKeywords() PyCFunction_Call() now calls _PyCFunction_FastCallDict() to factorize the code.
* Fix _PyMethodDef_RawFastCallDict() argument parsingVictor Stinner2017-01-181-14/+16
| | | | | | | | | Issue #29259: * Move also the !PyErr_Occurred() assertion to the top, similar to other functions. * Fix also comment/error messages: the function was renamed to _PyMethodDef_RawFastCallDict()
* _PyObject_FastCallKeywords() now checks the resultVictor Stinner2017-01-181-0/+2
| | | | Issue ##27830, Issue #29259.
* Optimize methoddescr_call(): avoid temporary PyCFunctionVictor Stinner2017-01-182-26/+33
| | | | | | Issue #29259, #29263. methoddescr_call() creates a PyCFunction object, call it and the destroy it. Add a new _PyMethodDef_RawFastCallDict() method to avoid the temporary PyCFunction object.
* Remove unused func parameter of _PyStack_UnpackDict()Victor Stinner2017-01-182-3/+2
| | | | Issue #29259.
* Convert some OrderedDict methods to Argument ClinicVictor Stinner2017-01-172-87/+219
| | | | | | | | | Issue #29289. Convert methods: * fromkeys() class method * setdefault() * popitem() * move_to_end()
* Run Argument Clinic: METH_VARARGS=>METH_FASTCALLVictor Stinner2017-01-175-37/+77
| | | | | | | | Issue #29286. Run Argument Clinic to get the new faster METH_FASTCALL calling convention for functions using "boring" positional arguments. Manually fix _elementtree: _elementtree_XMLParser_doctype() must remain consistent with the clinic code.
* Run Argument Clinic: METH_VARARGS=>METH_FASTCALLVictor Stinner2017-01-173-39/+87
| | | | | Issue #29286. Run Argument Clinic to get the new faster METH_FASTCALL calling convention for functions using only positional arguments.
* _PyStack_UnpackDict() now returns -1 on errorVictor Stinner2017-01-172-9/+11
| | | | | Issue #29286. Change _PyStack_UnpackDict() prototype to be able to notify of failure when args is NULL.
* Rename _PyArg_ParseStack to _PyArg_ParseStackAndKeywordsVictor Stinner2017-01-174-16/+16
| | | | Issue #29286.
* type_prepare() now uses fast call (METH_FASTCALL)Victor Stinner2017-01-161-2/+3
|
* Add _PyStack_AsTupleSlice() helperVictor Stinner2017-01-161-0/+23
|
* Optimize _PyCFunction_FastCallKeywords()Victor Stinner2017-01-161-36/+131
| | | | | | | | | | | | | | Issue #29259: Write fast path in _PyCFunction_FastCallKeywords() for METH_FASTCALL, avoid the creation of a temporary dictionary for keyword arguments. Cleanup also _PyCFunction_FastCallDict(): * Don't dereference func before checking that it's not NULL * Move code to raise the "no keyword argument" exception into a new no_keyword_error label. Update python-gdb.py for the change.
* Issue #20180: forgot to update AC output.INADA Naoki2017-01-162-41/+39
|
* Issue #20180: convert unicode methods to AC.INADA Naoki2017-01-162-409/+1405
|
* Merge doc fixes from 3.6Martin Panter2017-01-141-1/+1
|\
| * Merge doc fixes from 3.5Martin Panter2017-01-141-1/+1
| |\
| | * Fix grammar, typos and markup in documentation and code commentsMartin Panter2017-01-141-1/+1
| | | | | | | | | | | | | | | | | | * Indent versionchanged at method level, not class level * Mark up ``--help`` to avoid generating an en dash * Use forward slash in Unix command line with a dollar sign ($) prompt
* | | Issue #1621: Overflow should not be possible in listextend()Martin Panter2017-01-141-0/+3
| | |
* | | Issue #28969: Fixed race condition in C implementation of functools.lru_cache.Serhiy Storchaka2017-01-121-8/+23
|\ \ \ | |/ / | | | | | | | | | KeyError could be raised when cached function with full cache was simultaneously called from differen threads with the same uncached arguments.
| * | Issue #28969: Fixed race condition in C implementation of functools.lru_cache.Serhiy Storchaka2017-01-121-8/+23
| |\ \ | | |/ | | | | | | | | | KeyError could be raised when cached function with full cache was simultaneously called from differen threads with the same uncached arguments.
| | * Issue #28969: Fixed race condition in C implementation of functools.lru_cache.Serhiy Storchaka2017-01-121-8/+23
| | | | | | | | | | | | | | | KeyError could be raised when cached function with full cache was simultaneously called from differen threads with the same uncached arguments.
* | | Disable _PyStack_AsTuple() inliningVictor Stinner2017-01-111-1/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue #29234: Inlining _PyStack_AsTuple() into callers increases their stack consumption, Disable inlining to optimize the stack consumption. Add _Py_NO_INLINE: use __attribute__((noinline)) of GCC and Clang. It reduces the stack consumption, bytes per call, before => after: test_python_call: 1040 => 976 (-64 B) test_python_getitem: 976 => 912 (-64 B) test_python_iterator: 1120 => 1056 (-64 B) => total: 3136 => 2944 (- 192 B)
* | | call_method() now uses _PyObject_FastCall()Victor Stinner2017-01-102-44/+66
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Issue #29233: Replace the inefficient _PyObject_VaCallFunctionObjArgs() with _PyObject_FastCall() in call_method() and call_maybe(). Only a few functions call call_method() and call it with a fixed number of arguments. Avoid the complex and expensive _PyObject_VaCallFunctionObjArgs() function, replace it with an array allocated on the stack with the exact number of argumlents. It reduces the stack consumption, bytes per call, before => after: test_python_call: 1168 => 1152 (-16 B) test_python_getitem: 1344 => 1008 (-336 B) test_python_iterator: 1568 => 1232 (-336 B) Remove the _PyObject_VaCallFunctionObjArgs() function which became useless. Rename it to object_vacall() and make it private.
* | | Issue #29145: Merge 3.6.Xiang Zhang2017-01-102-7/+9
|\ \ \ | |/ /
| * | Issue #29145: Merge 3.5.Xiang Zhang2017-01-101-6/+8
| |\ \ | | |/
| | * Issue #29145: Fix overflow checks in str.replace() and str.join().Xiang Zhang2017-01-101-6/+8
| | | | | | | | | | | | Based on patch by Martin Panter.
* | | Merge 3.6INADA Naoki2017-01-062-17/+25
|\ \ \ | |/ /
| * | Issue #29159: Fix regression in bytes(x) when x.__index__() raises Exception.INADA Naoki2017-01-062-17/+25
| | |
* | | Issue #28839: Optimize function_call()Victor Stinner2017-01-031-47/+6
| | | | | | | | | | | | | | | | | | | | | function_call() now simply calls _PyFunction_FastCallDict(). _PyFunction_FastCallDict() is more efficient: it contains fast paths for the common case (optimized code object and no keyword argument).
* | | Merge 3.6.Stefan Krah2016-12-301-1/+1
|\ \ \ | |/ /
| * | Merge 3.5.Stefan Krah2016-12-301-1/+1
| |\ \ | | |/
| | * Issue #29111: Fix memoryview signature.Stefan Krah2016-12-301-1/+1
| | |
| | * Issue #29073: bytearray formatting no longer truncates on first null byte.Serhiy Storchaka2016-12-281-1/+3
| | |
* | | Issue #28427: old keys should not remove new values fromAntoine Pitrou2016-12-271-16/+74
|\ \ \ | |/ / | | | | | | WeakValueDictionary when collecting from another thread.
| * | Issue #28427: old keys should not remove new values fromAntoine Pitrou2016-12-271-17/+74
| |\ \ | | |/ | | | | | | WeakValueDictionary when collecting from another thread.
| | * Issue #28427: old keys should not remove new values fromAntoine Pitrou2016-12-271-25/+56
| | | | | | | | | | | | WeakValueDictionary when collecting from another thread.
* | | Issue #29049: Call _PyObject_GC_TRACK() lazily when calling Python function.INADA Naoki2016-12-241-4/+16
| | | | | | | | | | | | Calling function is up to 5% faster.
* | | Issue #29044: Merge 3.6.Xiang Zhang2016-12-221-3/+4
|\ \ \ | |/ /
| * | Issue #29044: Merge 3.5.Xiang Zhang2016-12-221-3/+4
| |\ \ | | |/
| | * Issue #29044: Fix a use-after-free in string '%c' formatter.Xiang Zhang2016-12-221-3/+4
| | |
| | * Issue #28147: Fix a memory leak in split-table dictionariesINADA Naoki2016-12-201-6/+15
| | | | | | | | | | | | setattr() must not convert combined table into split table.
* | | Issue #28822: Adjust indices handling of PyUnicode_FindChar().Xiang Zhang2016-12-201-8/+4
| | |
* | | Issue #28927: bytes.fromhex() and bytearray.fromhex() now ignore all ASCIISerhiy Storchaka2016-12-191-2/+2
| | | | | | | | | | | | whitespace, not only spaces. Patch by Robert Xiao.
* | | Issue #29000: Fixed bytes formatting of octals with zero padding in alternateSerhiy Storchaka2016-12-171-3/+2
|\ \ \ | |/ / | | | | | | form.
| * | Issue #29000: Fixed bytes formatting of octals with zero padding in alternateSerhiy Storchaka2016-12-171-3/+2
| |\ \ | | |/ | | | | | | form.
| | * Issue #29000: Fixed bytes formatting of octals with zero padding in alternateSerhiy Storchaka2016-12-171-3/+2
| | | | | | | | | | | | form.
* | | Issue #18896: Python function can now have more than 255 parameters.Serhiy Storchaka2016-12-161-7/+13
| | | | | | | | | | | | collections.namedtuple() now supports tuples with more than 255 elements.
* | | Issue #28959: Added private macro PyDict_GET_SIZE for retrieving the size of ↵Serhiy Storchaka2016-12-169-22/+21
| | | | | | | | | | | | dict.
* | | Merge 3.6.Xavier de Gaye2016-12-151-3/+3
|\ \ \ | |/ /