aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/pystate.c
diff options
context:
space:
mode:
authorBrandt Bucher <brandtbucher@microsoft.com>2025-01-28 16:10:51 -0800
committerGitHub <noreply@github.com>2025-01-28 16:10:51 -0800
commit828b27680f07f1ed8302616b8229f49c09032657 (patch)
tree234ff54d729e7233cca6a943800d1dadc20189d9 /Python/pystate.c
parent5c930a26fb78c40929f1b894efee1b07c6d828fd (diff)
downloadcpython-828b27680f07f1ed8302616b8229f49c09032657.tar.gz
cpython-828b27680f07f1ed8302616b8229f49c09032657.zip
GH-126599: Remove the PyOptimizer API (GH-129194)
Diffstat (limited to 'Python/pystate.c')
-rw-r--r--Python/pystate.c10
1 files changed, 1 insertions, 9 deletions
diff --git a/Python/pystate.c b/Python/pystate.c
index 26047edb459..e6770ef40df 100644
--- a/Python/pystate.c
+++ b/Python/pystate.c
@@ -655,11 +655,9 @@ init_interpreter(PyInterpreterState *interp,
}
interp->sys_profile_initialized = false;
interp->sys_trace_initialized = false;
-#ifdef _Py_TIER2
- (void)_Py_SetOptimizer(interp, NULL);
+ interp->jit = false;
interp->executor_list_head = NULL;
interp->trace_run_counter = JIT_CLEANUP_THRESHOLD;
-#endif
if (interp != &runtime->_main_interpreter) {
/* Fix the self-referential, statically initialized fields. */
interp->dtoa = (struct _dtoa_state)_dtoa_state_INIT(interp);
@@ -829,12 +827,6 @@ interpreter_clear(PyInterpreterState *interp, PyThreadState *tstate)
tstate->_status.cleared = 0;
}
-#ifdef _Py_TIER2
- _PyOptimizerObject *old = _Py_SetOptimizer(interp, NULL);
- assert(old != NULL);
- Py_DECREF(old);
-#endif
-
/* It is possible that any of the objects below have a finalizer
that runs Python code or otherwise relies on a thread state
or even the interpreter state. For now we trust that isn't