Skip to content

Commit 24df49f

Browse files
Merge upstream changes, remove complicated hack
1 parent c33f277 commit 24df49f

File tree

5 files changed

+27
-524
lines changed

5 files changed

+27
-524
lines changed

Python/bytecodes.c

Lines changed: 0 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -5213,11 +5213,7 @@ dummy_func(
52135213
caller loses its exception */
52145214
assert(!_PyErr_Occurred(tstate));
52155215
#endif
5216-
#if defined(Py_TAIL_CALL_INTERP) && !defined(IN_TAIL_CALL_INTERP)
5217-
return _TAIL_CALL_entry(frame, stack_pointer, tstate, next_instr, 0, 0);
5218-
#else
52195216
DISPATCH();
5220-
#endif
52215217
}
52225218

52235219
label(pop_4_error) {
@@ -5313,14 +5309,7 @@ dummy_func(
53135309
lltrace_resume_frame(frame);
53145310
}
53155311
#endif
5316-
// This is a little complicated...
5317-
// If we are in a tail call handler, we want to tail call (DISPATCH).
5318-
// If we're not then we need the shim frame.
5319-
#if defined(Py_TAIL_CALL_INTERP) && !defined(IN_TAIL_CALL_INTERP)
5320-
return _TAIL_CALL_entry(frame, stack_pointer, tstate, next_instr, 0, 0);
5321-
#else
53225312
DISPATCH();
5323-
#endif
53245313
}
53255314

53265315
label(exit_unwind) {

Python/ceval.c

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -865,7 +865,11 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
865865
const _PyUOpInstruction *next_uop = NULL;
866866
#endif
867867

868+
#ifdef Py_TAIL_CALL_INTERP
869+
return _TAIL_CALL_start_frame(frame, stack_pointer, tstate, next_instr, 0, 0);
870+
#else
868871
goto start_frame;
872+
#endif
869873

870874
#include "generated_cases.c.h"
871875

Python/generated_cases.c.h

Lines changed: 11 additions & 43 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)