Skip to content

Commit 910bd88

Browse files
cleanup
1 parent eac485f commit 910bd88

File tree

2 files changed

+23
-23
lines changed

2 files changed

+23
-23
lines changed

.github/workflows/tail-call.yml

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,12 +3,14 @@ on:
33
pull_request:
44
paths:
55
- 'Python/bytecodes.c'
6-
- 'Python/ceval.c'
6+
- 'Python/ceval.c'
7+
- 'Python/ceval_macros.h'
78
- 'Python/generated_tail_call_handlers.c.h'
89
push:
910
paths:
1011
- 'Python/bytecodes.c'
1112
- 'Python/ceval.c'
13+
- 'Python/ceval_macros.h'
1214
- 'Python/generated_tail_call_handlers.c.h'
1315
workflow_dispatch:
1416

@@ -38,7 +40,7 @@ jobs:
3840
- aarch64-unknown-linux-gnu/gcc
3941
debug:
4042
- true
41-
# - false
43+
- false
4244
llvm:
4345
- 19
4446
include:

Python/ceval_macros.h

Lines changed: 19 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -150,13 +150,13 @@ do { \
150150

151151
#ifdef Py_TAIL_CALL_INTERP
152152
#ifdef LLTRACE
153-
#define DISPATCH_INLINED(NEW_FRAME) \
154-
do { \
155-
assert(tstate->interp->eval_frame == NULL); \
153+
#define DISPATCH_INLINED(NEW_FRAME) \
154+
do { \
155+
assert(tstate->interp->eval_frame == NULL); \
156156
_PyFrame_SetStackPointer(frame, stack_pointer); \
157-
assert((NEW_FRAME)->previous == frame); \
158-
frame = tstate->current_frame = (NEW_FRAME); \
159-
CALL_STAT_INC(inlined_py_calls); \
157+
assert((NEW_FRAME)->previous == frame); \
158+
frame = tstate->current_frame = (NEW_FRAME); \
159+
CALL_STAT_INC(inlined_py_calls); \
160160
if (_Py_EnterRecursivePy(tstate)) {\
161161
CEVAL_GOTO(exit_unwind);\
162162
} \
@@ -165,27 +165,25 @@ do { \
165165
lltrace = maybe_lltrace_resume_frame(frame, GLOBALS()); \
166166
if (lltrace < 0) { \
167167
CEVAL_GOTO(exit_unwind); \
168-
} \
169-
NEXTOPARG(); \
170-
Py_MUSTTAIL \
171-
return (INSTRUCTION_TABLE[opcode])(TAIL_CALL_ARGS); \
168+
} \
169+
NEXTOPARG(); \
170+
DISPATCH_GOTO(); \
172171
} while (0)
173172
#else
174-
#define DISPATCH_INLINED(NEW_FRAME) \
175-
do { \
176-
assert(tstate->interp->eval_frame == NULL); \
173+
#define DISPATCH_INLINED(NEW_FRAME) \
174+
do { \
175+
assert(tstate->interp->eval_frame == NULL); \
177176
_PyFrame_SetStackPointer(frame, stack_pointer); \
178-
assert((NEW_FRAME)->previous == frame); \
179-
frame = tstate->current_frame = (NEW_FRAME); \
180-
CALL_STAT_INC(inlined_py_calls); \
181-
if (_Py_EnterRecursivePy(tstate)) {\
182-
CEVAL_GOTO(exit_unwind);\
177+
assert((NEW_FRAME)->previous == frame); \
178+
frame = tstate->current_frame = (NEW_FRAME); \
179+
CALL_STAT_INC(inlined_py_calls); \
180+
if (_Py_EnterRecursivePy(tstate)) { \
181+
CEVAL_GOTO(exit_unwind); \
183182
} \
184183
next_instr = frame->instr_ptr; \
185184
stack_pointer = _PyFrame_GetStackPointer(frame); \
186-
NEXTOPARG(); \
187-
Py_MUSTTAIL \
188-
return (INSTRUCTION_TABLE[opcode])(TAIL_CALL_ARGS); \
185+
NEXTOPARG(); \
186+
DISPATCH_GOTO(); \
189187
} while (0)
190188
#endif
191189
#else

0 commit comments

Comments
 (0)