mirror of
https://github.com/python/cpython.git
synced 2025-08-04 17:08:35 +00:00
bpo-44187: Quickening infrastructure (GH-26264)
* Add co_firstinstr field to code object. * Implement barebones quickening. * Use non-quickened bytecode when tracing. * Add NEWS item * Add new file to Windows build. * Don't specialize instructions with EXTENDED_ARG.
This commit is contained in:
parent
89e50ab36f
commit
001eb520b5
12 changed files with 416 additions and 12 deletions
29
Python/clinic/sysmodule.c.h
generated
29
Python/clinic/sysmodule.c.h
generated
|
@ -710,6 +710,33 @@ exit:
|
|||
|
||||
#endif /* defined(Py_REF_DEBUG) */
|
||||
|
||||
PyDoc_STRVAR(sys__getquickenedcount__doc__,
|
||||
"_getquickenedcount($module, /)\n"
|
||||
"--\n"
|
||||
"\n");
|
||||
|
||||
#define SYS__GETQUICKENEDCOUNT_METHODDEF \
|
||||
{"_getquickenedcount", (PyCFunction)sys__getquickenedcount, METH_NOARGS, sys__getquickenedcount__doc__},
|
||||
|
||||
static Py_ssize_t
|
||||
sys__getquickenedcount_impl(PyObject *module);
|
||||
|
||||
static PyObject *
|
||||
sys__getquickenedcount(PyObject *module, PyObject *Py_UNUSED(ignored))
|
||||
{
|
||||
PyObject *return_value = NULL;
|
||||
Py_ssize_t _return_value;
|
||||
|
||||
_return_value = sys__getquickenedcount_impl(module);
|
||||
if ((_return_value == -1) && PyErr_Occurred()) {
|
||||
goto exit;
|
||||
}
|
||||
return_value = PyLong_FromSsize_t(_return_value);
|
||||
|
||||
exit:
|
||||
return return_value;
|
||||
}
|
||||
|
||||
PyDoc_STRVAR(sys_getallocatedblocks__doc__,
|
||||
"getallocatedblocks($module, /)\n"
|
||||
"--\n"
|
||||
|
@ -983,4 +1010,4 @@ sys__deactivate_opcache(PyObject *module, PyObject *Py_UNUSED(ignored))
|
|||
#ifndef SYS_GETANDROIDAPILEVEL_METHODDEF
|
||||
#define SYS_GETANDROIDAPILEVEL_METHODDEF
|
||||
#endif /* !defined(SYS_GETANDROIDAPILEVEL_METHODDEF) */
|
||||
/*[clinic end generated code: output=68c62b9ca317a0c8 input=a9049054013a1b77]*/
|
||||
/*[clinic end generated code: output=e77bf636a177c5c3 input=a9049054013a1b77]*/
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue