File tree Expand file tree Collapse file tree 1 file changed +19
-0
lines changed
Expand file tree Collapse file tree 1 file changed +19
-0
lines changed Original file line number Diff line number Diff line change @@ -384,6 +384,24 @@ _PyFrame_SetStackPointer(frame, stack_pointer)
384384/* Tier-switching macros. */
385385
386386#ifdef _Py_JIT
387+ #ifdef Py_TAIL_CALL_INTERP
388+ #define GOTO_TIER_TWO (EXECUTOR ) \
389+ do { \
390+ OPT_STAT_INC(traces_executed); \
391+ jit_func jitted = (EXECUTOR)->jit_code; \
392+ next_instr = jitted(frame, stack_pointer, tstate); \
393+ Py_DECREF(tstate->previous_executor); \
394+ tstate->previous_executor = NULL; \
395+ frame = tstate->current_frame; \
396+ if (next_instr == NULL) { \
397+ next_instr = frame->instr_ptr; \
398+ stack_pointer = _PyFrame_GetStackPointer(frame); \
399+ return _TAIL_CALL_error(TAIL_CALL_ARGS); \
400+ } \
401+ stack_pointer = _PyFrame_GetStackPointer(frame); \
402+ DISPATCH(); \
403+ } while (0)
404+ #else
387405#define GOTO_TIER_TWO (EXECUTOR ) \
388406do { \
389407 OPT_STAT_INC(traces_executed); \
@@ -400,6 +418,7 @@ do { \
400418 stack_pointer = _PyFrame_GetStackPointer(frame); \
401419 DISPATCH(); \
402420} while (0)
421+ #endif
403422#else
404423#define GOTO_TIER_TWO (EXECUTOR ) \
405424do { \
You can’t perform that action at this time.
0 commit comments