| Commit message (Collapse) | Author | Age | Files | Lines |
... | |
| | |
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Tested on macOS 10.11 dtrace, Ubuntu 16.04 SystemTap, and libbcc.
Largely based by an initial patch by Jesús Cea Avión, with some
influence from Dave Malcolm's SystemTap patch and Nikhil Benesch's
unification patch.
Things deliberately left out for simplicity:
- ustack helpers, I have no way of testing them at this point since
they are Solaris-specific
- PyFrameObject * in function__entry/function__return, this is
SystemTap-specific
- SPARC support
- dynamic tracing
- sys module dtrace facility introspection
All of those might be added later.
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| | |
Use _PyCFunction_FastCallKeywords() in ceval.c: it allows to remove a lot of
code from ceval.c which was only used to call C functions.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Issue #27830: Add _PyObject_FastCallKeywords(): avoid the creation of a
temporary dictionary for keyword arguments.
Other changes:
* Cleanup call_function() and fast_function() (ex: rename nk to nkwargs)
* Remove now useless do_call(), replaced with _PyObject_FastCallKeywords()
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Issue #27213: Rework CALL_FUNCTION* opcodes to produce shorter and more
efficient bytecode:
* CALL_FUNCTION now only accepts position arguments
* CALL_FUNCTION_KW accepts position arguments and keyword arguments, but keys
of keyword arguments are packed into a constant tuple.
* CALL_FUNCTION_EX is the most generic, it expects a tuple and a dict for
positional and keyword arguments.
CALL_FUNCTION_VAR and CALL_FUNCTION_VAR_KW opcodes have been removed.
2 tests of test_traceback are currently broken: skip test, the issue #28050 was
created to track the issue.
Patch by Demur Rumed, design by Serhiy Storchaka, reviewed by Serhiy Storchaka
and Victor Stinner.
|
| | |
|
| | |
|
| |
| |
| |
| | |
Patch by Ivan Levkivskyi.
|
| | |
|
| |
| |
| |
| | |
This completes PEP 523.
|
| | |
|
| | |
|
| | |
|
| | |
|
| |
| |
| |
| |
| |
| | |
Issue #27830: Similar to _PyObject_FastCallDict(), but keyword arguments are
also passed in the same C array than positional arguments, rather than being
passed as a Python dict.
|
| |
| |
| |
| |
| | |
Issue #27848: use Py_ssize_t rather than C int for the number of function
positional and keyword arguments.
|
| |
| |
| |
| |
| |
| | |
Issue #27809: PyEval_CallObjectWithKeywords() doesn't increment temporary the
reference counter of the args tuple (positional arguments). The caller already
holds a strong reference to it.
|
| |
| |
| |
| |
| | |
Issue #27809. _PyObject_FastCallDict() now supports keyword arguments, and so
the args==NULL fast-path can also be used when kwargs is not NULL.
|
| |
| |
| |
| |
| | |
* Rename nm to name
* PEP 7: add { ... } to if/else blocks
|
| |
| |
| |
| |
| |
| |
| |
| | |
Issue #27809:
* Rename _PyFunction_FastCall() to _PyFunction_FastCallDict()
* Rename _PyCFunction_FastCall() to _PyCFunction_FastCallDict()
* _PyFunction_FastCallDict() now supports keyword arguments
|
| |
| |
| |
| |
| |
| |
| |
| | |
Issue #27809:
* Rename _PyObject_FastCall() function to _PyObject_FastCallDict()
* Add _PyObject_FastCall(), _PyObject_CallNoArg() and _PyObject_CallArg1()
macros calling _PyObject_FastCallDict()
|
| |
| |
| |
| |
| |
| | |
Issue #27128. When a Python function is called with no arguments, but all
parameters have a default value: use default values as arguments for the fast
path.
|
| |
| |
| |
| |
| | |
Issue #27128: import_name() now calls _PyObject_FastCall() to avoid the
creation of a temporary tuple.
|
| |
| |
| |
| |
| |
| | |
Issue #27128: arg=>args, kw=>kwargs.
Same change for PyEval_CallObjectWithKeywords().
|
| |
| |
| |
| |
| |
| | |
Issue #27128: Modify PyEval_CallObjectWithKeywords() to use
_PyObject_FastCall() when args==NULL and kw==NULL. It avoids the creation of a
temporary empty tuple for positional arguments.
|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Issue #27128: Add _PyObject_FastCall(), a new calling convention avoiding a
temporary tuple to pass positional parameters in most cases, but create a
temporary tuple if needed (ex: for the tp_call slot).
The API is prepared to support keyword parameters, but the full implementation
will come later (_PyFunction_FastCall() doesn't support keyword parameters
yet).
Add also:
* _PyStack_AsTuple() helper function: convert a "stack" of parameters to
a tuple.
* _PyCFunction_FastCall(): fast call implementation for C functions
* _PyFunction_FastCall(): fast call implementation for Python functions
|
|\ \
| |/ |
|
| |
| |
| |
| |
| |
| |
| |
| | |
Issue #27558: Fix a SystemError in the implementation of "raise" statement.
In a brand new thread, raise a RuntimeError since there is no active
exception to reraise.
Patch written by Xiang Zhang.
|
| |
| |
| |
| |
| |
| |
| |
| | |
Issue #27128, #18295: replace int type with Py_ssize_t for index variables used
for positional arguments. It should help to avoid integer overflow and help to
emit better machine code for "i++" (no trap needed for overflow).
Make also the total_args variable constant.
|
| |
| |
| |
| |
| |
| |
| |
| | |
* Add comments
* Add empty lines for readability
* PEP 7 style for if block
* Remove useless assert(globals != NULL); (globals is tested a few lines
before)
|
| | |
|
|\ \
| |/ |
|
| | |
|
| |
| |
| |
| | |
the implementation of the IMPORT_NAME opcode.
|
| | |
|
| |
| |
| |
| | |
Patch by Demur Rumed.
|
| | |
|
|\ \
| |/ |
|
| | |
|
| | |
|
| |
| |
| |
| | |
instruction decoding. Based on patch by Demur Rumed.
|
| |
| |
| |
| | |
Patch by Demur Rumed.
|
|\ \
| |/ |
|
| |
| |
| |
| | |
Patch by Xiang Zhang.
|
| |
| |
| |
| | |
unscathed to the C-defined function. Now it is converted to exact dict.
|
| |
| |
| |
| | |
Patch by Joe Jevnik.
|
|\ \
| |/
| |
| | |
in places where Py_DECREF was used.
|