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
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Cleanup some commented-out lines
  • Loading branch information
gvanrossum committed Jul 7, 2023
commit d6235ee51b83aaffd4ce6b4f70d725c49f7d149a
12 changes: 0 additions & 12 deletions Python/bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -2422,11 +2422,8 @@ dummy_func(
assert(next_instr[INLINE_CACHE_ENTRIES_FOR_ITER + oparg].op.code == END_FOR ||
next_instr[INLINE_CACHE_ENTRIES_FOR_ITER + oparg].op.code == INSTRUMENTED_END_FOR);
Py_DECREF(iter);
// STACK_SHRINK(1);
// SKIP_OVER(INLINE_CACHE_ENTRIES_FOR_ITER);
/* Jump forward oparg, then skip following END_FOR instruction */
JUMP_POP_DISPATCH(INLINE_CACHE_ENTRIES_FOR_ITER + oparg + 1, 1);
// DISPATCH();
}
// Common case: no jump, leave it to the code generator
}
Expand Down Expand Up @@ -2473,11 +2470,8 @@ dummy_func(
Py_DECREF(seq);
}
Py_DECREF(iter);
// STACK_SHRINK(1);
// SKIP_OVER(INLINE_CACHE_ENTRIES_FOR_ITER);
/* Jump forward oparg, then skip following END_FOR instruction */
JUMP_POP_DISPATCH(INLINE_CACHE_ENTRIES_FOR_ITER + oparg + 1, 1);
// DISPATCH();
end_for_iter_list:
// Common case: no jump, leave it to the code generator
}
Expand All @@ -2496,11 +2490,8 @@ dummy_func(
Py_DECREF(seq);
}
Py_DECREF(iter);
// STACK_SHRINK(1);
// SKIP_OVER(INLINE_CACHE_ENTRIES_FOR_ITER);
/* Jump forward oparg, then skip following END_FOR instruction */
JUMP_POP_DISPATCH(INLINE_CACHE_ENTRIES_FOR_ITER + oparg + 1, 1);
// DISPATCH();
end_for_iter_tuple:
// Common case: no jump, leave it to the code generator
}
Expand All @@ -2512,10 +2503,7 @@ dummy_func(
if (r->len <= 0) {
// STACK_SHRINK(1);
Py_DECREF(r);
// SKIP_OVER(INLINE_CACHE_ENTRIES_FOR_ITER);
// Jump over END_FOR instruction.
JUMP_POP_DISPATCH(INLINE_CACHE_ENTRIES_FOR_ITER + oparg + 1, 1);
// DISPATCH();
}
long value = r->start;
r->start = value + r->step;
Expand Down
69 changes: 30 additions & 39 deletions Python/executor_cases.c.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading