GH-113710: Backedge counter improvements. (GH-115166)

This commit is contained in:
Mark Shannon 2024-02-13 14:16:37 +00:00 committed by GitHub
parent 7cce857622
commit f9f6156c5a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
7 changed files with 81 additions and 55 deletions

View file

@ -1627,8 +1627,8 @@ finalize_modules(PyThreadState *tstate)
// Invalidate all executors and turn off tier 2 optimizer
_Py_Executors_InvalidateAll(interp);
Py_XDECREF(interp->optimizer);
interp->optimizer = &_PyOptimizer_Default;
_PyOptimizerObject *old = _Py_SetOptimizer(interp, NULL);
Py_XDECREF(old);
// Stop watching __builtin__ modifications
PyDict_Unwatch(0, interp->builtins);