GH-118093: Handle some polymorphism before requiring progress in tier two (GH-122843)

This commit is contained in:
Brandt Bucher 2024-08-12 12:39:31 -07:00 committed by GitHub
parent 503af8fe9a
commit 9621a7d017
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
6 changed files with 73 additions and 42 deletions

View file

@ -5015,7 +5015,8 @@
Py_INCREF(executor);
}
else {
int optimized = _PyOptimizer_Optimize(frame, target, stack_pointer, &executor);
int chain_depth = current_executor->vm_data.chain_depth + 1;
int optimized = _PyOptimizer_Optimize(frame, target, stack_pointer, &executor, chain_depth);
if (optimized <= 0) {
exit->temperature = restart_backoff_counter(temperature);
if (optimized < 0) {
@ -5147,7 +5148,7 @@
exit->temperature = advance_backoff_counter(exit->temperature);
GOTO_TIER_ONE(target);
}
int optimized = _PyOptimizer_Optimize(frame, target, stack_pointer, &executor);
int optimized = _PyOptimizer_Optimize(frame, target, stack_pointer, &executor, 0);
if (optimized <= 0) {
exit->temperature = restart_backoff_counter(exit->temperature);
if (optimized < 0) {