gh-141504: Refactor policy object into a single opt_config (gh-143644)

This commit is contained in:
Donghee Na 2026-01-15 09:53:00 +09:00 committed by GitHub
parent a73ba4d46e
commit 794f758cd8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
8 changed files with 89 additions and 64 deletions

View file

@ -48,8 +48,8 @@ _PyCode_Quicken(_Py_CODEUNIT *instructions, Py_ssize_t size, int enable_counters
_Py_BackoffCounter jump_counter, adaptive_counter;
if (enable_counters) {
PyThreadState *tstate = _PyThreadState_GET();
_PyThreadStateImpl *tstate_impl = (_PyThreadStateImpl *)tstate;
jump_counter = initial_jump_backoff_counter(&tstate_impl->policy);
PyInterpreterState *interp = tstate->interp;
jump_counter = initial_jump_backoff_counter(&interp->opt_config);
adaptive_counter = adaptive_counter_warmup();
}
else {