8000 gh-106581: Project through calls by gvanrossum · Pull Request #108067 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-106581: Project through calls #108067

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

Merged
merged 18 commits into from
Aug 17, 2023
Merged
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
Add _Py_LeaveRecursiveCallPy to _POP_FRAME
  • Loading branch information
gvanrossum committed Aug 16, 2023
commit 7760028dbd6a89712a42330c1bf54531105903f9
4 changes: 1 addition & 3 deletions Python/bytecodes.c
Original file line number Diff line number Diff line change
Expand Up @@ -770,13 +770,11 @@ dummy_func(
op(_POP_FRAME, (retval --)) {
assert(EMPTY());
SAVE_FRAME_STATE(); // Signals to the code generator
#if TIER_ONE
_Py_LeaveRecursiveCallPy(tstate);
assert(frame != &entry_frame);
#endif
// GH-99729: We need to unlink the frame *before* clearing it:
_PyInterpreterFrame *dying = frame;
#if TIER_ONE
assert(frame != &entry_frame);
frame = cframe.current_frame = dying->previous;
#endif
#if TIER_TWO
Expand Down
4 changes: 0 additions & 4 deletions Python/ceval.c
Original file line number Diff line number Diff line change
Expand Up @@ -601,10 +601,6 @@ int _Py_CheckRecursiveCallPy(
}


static inline void _Py_LeaveRecursiveCallPy(PyThreadState *tstate) {
tstate->py_recursion_remaining++;
}

static const _Py_CODEUNIT _Py_INTERPRETER_TRAMPOLINE_INSTRUCTIONS[] = {
/* Put a NOP at the start, so that the IP points into
* the code, rather than before it */
Expand Down
4 changes: 4 additions & 0 deletions Python/ceval_macros.h
Original file line number Diff line number Diff line change
Expand Up @@ -369,3 +369,7 @@ static inline int _Py_EnterRecursivePy(PyThreadState *tstate) {
return (tstate->py_recursion_remaining-- <= 0) &&
_Py_CheckRecursiveCallPy(tstate);
}

static inline void _Py_LeaveRecursiveCallPy(PyThreadState *tstate) {
tstate->py_recursion_remaining++;
}
4 changes: 1 addition & 3 deletions Python/executor_cases.c.h

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

8 changes: 2 additions & 6 deletions Python/generated_cases.c.h

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

0