GH-133231: Add JIT utilities in sys._jit (GH-133233)

This commit is contained in:
Brandt Bucher 2025-05-05 15:25:22 -07:00 committed by GitHub
parent f9b22bb79d
commit b1aa515bd6
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
11 changed files with 296 additions and 54 deletions

View file

@ -1206,13 +1206,6 @@ verify_stateless_code(PyObject *self, PyObject *args, PyObject *kwargs)
Py_RETURN_NONE;
}
static PyObject *
jit_enabled(PyObject *self, PyObject *arg)
{
return PyBool_FromLong(_PyInterpreterState_GET()->jit);
}
#ifdef _Py_TIER2
static PyObject *
@ -2337,7 +2330,6 @@ static PyMethodDef module_functions[] = {
METH_VARARGS | METH_KEYWORDS, NULL},
{"verify_stateless_code", _PyCFunction_CAST(verify_stateless_code),
METH_VARARGS | METH_KEYWORDS, NULL},
{"jit_enabled", jit_enabled, METH_NOARGS, NULL},
#ifdef _Py_TIER2
{"add_executor_dependency", add_executor_dependency, METH_VARARGS, NULL},
{"invalidate_executors", invalidate_executors, METH_O, NULL},