8000 gh-104584: Support most jumping instructions by gvanrossum · Pull Request #106393 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-104584: Support most jumping instructions #106393

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 9 commits into from
Prev Previous commit
Next Next commit
Check room available for JUMP_TO_TOP
  • Loading branch information
gvanrossum committed Jul 7, 2023
commit b33a1a29e192bbcab6cf51756ab351e2185ece6c
6 changes: 4 additions & 2 deletions Python/optimizer.c
Original file line number Diff line number Diff line change
Expand Up @@ -455,9 +455,11 @@ translate_bytecode_to_trace(
}
case JUMP_BACKWARD:
{
if (instr + 2 - operand == initial_instr) {
if (instr + 2 - operand == initial_instr
&& trace_length + 3 <= max_length)
{
ADD_TO_TRACE(JUMP_TO_TOP, 0);
break;
goto done;
}
// Else fall through!
}
Expand Down
0