mirror of
https://github.com/python/cpython.git
synced 2025-07-08 03:45:36 +00:00
GH-126599: Remove the PyOptimizer API (GH-129194)
This commit is contained in:
parent
5c930a26fb
commit
828b27680f
23 changed files with 345 additions and 435 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue