diff options
author | Mark Shannon <mark@hotpy.org> | 2025-01-31 17:13:20 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-01-31 17:13:20 (GMT) |
commit | 54f74b80aef8b581f2b124d150903cec83aff005 (patch) | |
tree | 39812b9759f3dda0dedb70b8a6129363a4e2ca51 /Python/generated_cases.c.h | |
parent | 9ba281d871c4df3a3ac4cb7896d24ba0d42751a3 (diff) | |
download | cpython-54f74b80aef8b581f2b124d150903cec83aff005.zip cpython-54f74b80aef8b581f2b124d150903cec83aff005.tar.gz cpython-54f74b80aef8b581f2b124d150903cec83aff005.tar.bz2 |
GH-128563: Move some labels, to simplify implementing tailcalling interpreter. (GH-129525)
Diffstat (limited to 'Python/generated_cases.c.h')
-rw-r--r-- | Python/generated_cases.c.h | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h index ffdad70..38ea63d 100644 --- a/Python/generated_cases.c.h +++ b/Python/generated_cases.c.h @@ -8703,14 +8703,36 @@ tstate->c_recursion_remaining += PY_EVAL_C_STACK_UNITS; return NULL; } - goto resume_with_error; + next_instr = frame->instr_ptr; + stack_pointer = _PyFrame_GetStackPointer(frame); + goto error; } - resume_with_error: + start_frame: { + if (_Py_EnterRecursivePy(tstate)) { + goto exit_unwind; + } next_instr = frame->instr_ptr; stack_pointer = _PyFrame_GetStackPointer(frame); - goto error; + #ifdef LLTRACE + { + int lltrace = maybe_lltrace_resume_frame(frame, GLOBALS()); + frame->lltrace = lltrace; + if (lltrace < 0) { + goto exit_unwind; + } + } + #endif + + #ifdef Py_DEBUG + /* _PyEval_EvalFrameDefault() must not be called with an exception set, + because it can clear it (directly or indirectly) and so the + caller loses its exception */ + assert(!_PyErr_Occurred(tstate)); + #endif + + DISPATCH(); } /* END LABELS */ |