Victor Stinner
0c4a828cad
Run Argument Clinic: METH_VARARGS=>METH_FASTCALL
...
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.
2017-01-17 02:21:47 +01:00
Victor Stinner
fe54dd8a08
Add _PyArg_UnpackStack() function helper
...
Issue #29286 .
2017-01-17 02:33:55 +01:00
Victor Stinner
259f0e4437
Run Argument Clinic: METH_VARARGS=>METH_FASTCALL
...
Issue #29286 . Run Argument Clinic to get the new faster METH_FASTCALL calling
convention for functions using only positional arguments.
2017-01-17 01:35:17 +01:00
Victor Stinner
29d39cc8f5
Add _PyArg_NoStackKeywords() helper function
...
Issue #29286 . Similar to _PyArg_NoKeywords(), but expects a tuple of keyword
names, instead of a dict.
2017-01-17 01:40:01 +01:00
Victor Stinner
6518a93cb1
Add _PyArg_ParseStack() helper function
...
Issue #29286 . Function similar to PyArg_ParseTuple(), but uses a C array of
PyObject* to pass arguments. Don't support the compatibility mode.
2017-01-17 01:29:49 +01:00
Victor Stinner
3e1fad6913
Rename _PyArg_ParseStack to _PyArg_ParseStackAndKeywords
...
Issue #29286 .
2017-01-17 01:29:01 +01:00
Victor Stinner
c0083fc47d
Rename keywords to kwargs in getargs.c
...
Issue #29029 . Patch written by Serhiy Storchaka.
2017-01-17 00:37:42 +01:00
Victor Stinner
80ab22fa2c
Cleanup getargs.c
...
Factorize argument checks in:
* vgetargskeywordsfast()
* vgetargskeywordsfast_impl()
2017-01-16 23:16:47 +01:00
Victor Stinner
773dc6dd06
__build_class__() builtin uses METH_FASTCALL
2017-01-16 23:46:26 +01:00
INADA Naoki
015bce64b3
Issue #26110 : Add document for LOAD_METHOD and CALL_METHOD opcode.
...
Changed stack layout bit for "easy to explain."
2017-01-16 17:23:30 +09:00
Victor Stinner
231d1f3439
_PyEval_EvalCodeWithName(): remove redundant check
...
Replace the runtime check with an assertion (just in case).
2017-01-11 02:12:06 +01:00
Victor Stinner
415c5107be
Inline call_function()
...
Issue #29227 : Inline call_function() into _PyEval_EvalFrameDefault() using
Py_LOCAL_INLINE to reduce the stack consumption.
It reduces the stack consumption, bytes per call, before => after:
test_python_call: 1152 => 1040 (-112 B)
test_python_getitem: 1008 => 976 (-32 B)
test_python_iterator: 1232 => 1120 (-112 B)
=> total: 3392 => 3136 (- 256 B)
2017-01-11 00:54:57 +01:00
Victor Stinner
b27df6faa5
Issue #29157 : enhance py_getrandom() documentation
2017-01-06 11:39:15 +01:00
Victor Stinner
de2f1ea124
py_getentropy() now supports ENOSYS, EPERM & EINTR
...
Issue #29157 .
2017-01-06 11:33:18 +01:00
Victor Stinner
2f7964393d
Issue #29157 : getrandom() is now preferred over getentropy()
...
The glibc now implements getentropy() on Linux using the getrandom() syscall.
But getentropy() doesn't support non-blocking mode.
Since getrandom() is tried first, it's not more needed to explicitly exclude
getentropy() on Solaris. Replace:
if defined(HAVE_GETENTROPY) && !defined(sun)
with
if defined(HAVE_GETENTROPY)
2017-01-06 11:26:01 +01:00
Victor Stinner
a49a2078e8
Issue #29157 : Simplify dev_urandom()
...
pyurandom() is now responsible to call getentropy() or getrandom().
Enhance also dev_urandom() and pyurandom() documentation.
2017-01-06 11:17:52 +01:00
Victor Stinner
dcdb60e4b3
Issue #29157 : dev_urandom() now calls py_getentropy()
...
Prepare the fallback to support getentropy() failure and falls back on reading
from /dev/urandom.
2017-01-06 11:16:20 +01:00
Victor Stinner
865a0f621f
Optimize _PyFunction_FastCallDict() when kwargs is {}
...
Issue #28839 : Optimize _PyFunction_FastCallDict() when kwargs is an empty
dictionary, avoid the creation of an useless empty tuple.
2017-01-03 02:01:42 +01:00
Benjamin Peterson
646bf754e3
merge 3.6 ( #29057 )
2017-01-01 22:30:35 -06:00
Benjamin Peterson
46322587ec
merge 3.5 ( #29057 )
2017-01-01 22:30:26 -06:00
Benjamin Peterson
493ac1bbe0
only include sys/random.h if it seems like it might have something useful ( #29057 )
2017-01-01 22:29:36 -06:00
Benjamin Peterson
6784be1d00
merge 3.6
2017-01-01 22:08:51 -06:00
Benjamin Peterson
5848e72ee1
merge 3.5
2017-01-01 22:08:44 -06:00
Benjamin Peterson
4365833d11
merge 3.4
2017-01-01 22:08:33 -06:00
Benjamin Peterson
b6e2142b0c
merge 3.3
2017-01-01 22:07:37 -06:00