GH-126599: Remove the PyOptimizer API (GH-129194)

This commit is contained in:
Brandt Bucher 2025-01-28 16:10:51 -08:00 committed by GitHub
parent 5c930a26fb
commit 828b27680f
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
23 changed files with 345 additions and 435 deletions

View file

@ -2265,9 +2265,7 @@ sys_activate_stack_trampoline_impl(PyObject *module, const char *backend)
{
#ifdef PY_HAVE_PERF_TRAMPOLINE
#ifdef _Py_JIT
_PyOptimizerObject* optimizer = _Py_GetOptimizer();
if (optimizer != NULL) {
Py_DECREF(optimizer);
if (_PyInterpreterState_GET()->jit) {
PyErr_SetString(PyExc_ValueError, "Cannot activate the perf trampoline if the JIT is active");
return NULL;
}