mirror of
https://github.com/python/cpython.git
synced 2025-08-23 02:04:56 +00:00
GH-128563: Move some labels, to simplify implementing tailcalling interpreter. (GH-129525)
This commit is contained in:
parent
9ba281d871
commit
54f74b80ae
5 changed files with 89 additions and 54 deletions
|
@ -5303,14 +5303,40 @@ dummy_func(
|
|||
tstate->c_recursion_remaining += PY_EVAL_C_STACK_UNITS;
|
||||
return NULL;
|
||||
}
|
||||
goto resume_with_error;
|
||||
}
|
||||
|
||||
label(resume_with_error) {
|
||||
next_instr = frame->instr_ptr;
|
||||
stack_pointer = _PyFrame_GetStackPointer(frame);
|
||||
goto error;
|
||||
}
|
||||
|
||||
label(start_frame) {
|
||||
if (_Py_EnterRecursivePy(tstate)) {
|
||||
goto exit_unwind;
|
||||
}
|
||||
next_instr = frame->instr_ptr;
|
||||
stack_pointer = _PyFrame_GetStackPointer(frame);
|
||||
|
||||
#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 BYTECODES //
|
||||
|
||||
}
|
||||
|
@ -5320,7 +5346,6 @@ dummy_func(
|
|||
exit_unwind:
|
||||
handle_eval_breaker:
|
||||
resume_frame:
|
||||
resume_with_error:
|
||||
start_frame:
|
||||
unbound_local_error:
|
||||
;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue