aboutsummaryrefslogtreecommitdiffstatshomepage
path: root/Python/executor_cases.c.h
diff options
context:
space:
mode:
authorBrandt Bucher <brandtbucher@microsoft.com>2024-08-12 12:39:31 -0700
committerGitHub <noreply@github.com>2024-08-12 12:39:31 -0700
commit9621a7d0170bf1ec48bcfc35825007cdf75265ea (patch)
tree354b055c106043806da2b10b9cf144aa98ded0de /Python/executor_cases.c.h
parent503af8fe9a93ea6bc5bdfc76eb56b106a47c7292 (diff)
downloadcpython-9621a7d0170bf1ec48bcfc35825007cdf75265ea.tar.gz
cpython-9621a7d0170bf1ec48bcfc35825007cdf75265ea.zip
GH-118093: Handle some polymorphism before requiring progress in tier two (GH-122843)
Diffstat (limited to 'Python/executor_cases.c.h')
-rw-r--r--Python/executor_cases.c.h5
1 files changed, 3 insertions, 2 deletions
diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h
index 9102d684b14..0bccaf992fb 100644
--- a/Python/executor_cases.c.h
+++ b/Python/executor_cases.c.h
@@ -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) {