mirror of
https://github.com/python/cpython.git
synced 2025-10-17 20:28:43 +00:00
GH-126599: Remove the "counter" optimizer/executor (GH-126853)
This commit is contained in:
parent
27494dd9ad
commit
b44ff6d0df
13 changed files with 97 additions and 353 deletions
|
@ -989,12 +989,6 @@ get_co_framesize(PyObject *self, PyObject *arg)
|
|||
|
||||
#ifdef _Py_TIER2
|
||||
|
||||
static PyObject *
|
||||
new_counter_optimizer(PyObject *self, PyObject *arg)
|
||||
{
|
||||
return _PyOptimizer_NewCounter();
|
||||
}
|
||||
|
||||
static PyObject *
|
||||
new_uop_optimizer(PyObject *self, PyObject *arg)
|
||||
{
|
||||
|
@ -1034,12 +1028,6 @@ add_executor_dependency(PyObject *self, PyObject *args)
|
|||
if (!PyArg_ParseTuple(args, "OO", &exec, &obj)) {
|
||||
return NULL;
|
||||
}
|
||||
/* No way to tell in general if exec is an executor, so we only accept
|
||||
* counting_executor */
|
||||
if (strcmp(Py_TYPE(exec)->tp_name, "counting_executor")) {
|
||||
PyErr_SetString(PyExc_TypeError, "argument must be a counting_executor");
|
||||
return NULL;
|
||||
}
|
||||
_Py_Executor_DependsOn((_PyExecutorObject *)exec, obj);
|
||||
Py_RETURN_NONE;
|
||||
}
|
||||
|
@ -2101,7 +2089,6 @@ static PyMethodDef module_functions[] = {
|
|||
#ifdef _Py_TIER2
|
||||
{"get_optimizer", get_optimizer, METH_NOARGS, NULL},
|
||||
{"set_optimizer", set_optimizer, METH_O, NULL},
|
||||
{"new_counter_optimizer", new_counter_optimizer, METH_NOARGS, NULL},
|
||||
{"new_uop_optimizer", new_uop_optimizer, METH_NOARGS, NULL},
|
||||
{"add_executor_dependency", add_executor_dependency, METH_VARARGS, NULL},
|
||||
{"invalidate_executors", invalidate_executors, METH_O, NULL},
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue