gh-129989: Change Py_TAIL_CALL_INTERP ifndef to ! (#130269)

Change Py_TAIL_CALL_INTERP ifndef to !
This commit is contained in:
Ken Jin 2025-02-18 23:48:49 +08:00 committed by GitHub
parent dab456dcef
commit 46ac85e4d9
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 7 additions and 7 deletions

View file

@ -1358,7 +1358,7 @@ dummy_func(
tier1 inst(CLEANUP_THROW, (sub_iter, last_sent_val, exc_value_st -- none, value)) { tier1 inst(CLEANUP_THROW, (sub_iter, last_sent_val, exc_value_st -- none, value)) {
PyObject *exc_value = PyStackRef_AsPyObjectBorrow(exc_value_st); PyObject *exc_value = PyStackRef_AsPyObjectBorrow(exc_value_st);
#ifndef Py_TAIL_CALL_INTERP #if !Py_TAIL_CALL_INTERP
assert(throwflag); assert(throwflag);
#endif #endif
assert(exc_value && PyExceptionInstance_Check(exc_value)); assert(exc_value && PyExceptionInstance_Check(exc_value));

View file

@ -798,7 +798,7 @@ _PyEval_EvalFrameDefault(PyThreadState *tstate, _PyInterpreterFrame *frame, int
#ifdef Py_STATS #ifdef Py_STATS
int lastopcode = 0; int lastopcode = 0;
#endif #endif
#ifndef Py_TAIL_CALL_INTERP #if !Py_TAIL_CALL_INTERP
uint8_t opcode; /* Current opcode */ uint8_t opcode; /* Current opcode */
int oparg; /* Current opcode argument, if any */ int oparg; /* Current opcode argument, if any */
assert(tstate->current_frame == NULL || tstate->current_frame->stackpointer != NULL); assert(tstate->current_frame == NULL || tstate->current_frame->stackpointer != NULL);

View file

@ -8,7 +8,7 @@
#endif #endif
#define TIER_ONE 1 #define TIER_ONE 1
#ifndef Py_TAIL_CALL_INTERP #if !Py_TAIL_CALL_INTERP
#if !USE_COMPUTED_GOTOS #if !USE_COMPUTED_GOTOS
dispatch_opcode: dispatch_opcode:
switch (opcode) switch (opcode)
@ -4409,7 +4409,7 @@
last_sent_val = stack_pointer[-2]; last_sent_val = stack_pointer[-2];
sub_iter = stack_pointer[-3]; sub_iter = stack_pointer[-3];
PyObject *exc_value = PyStackRef_AsPyObjectBorrow(exc_value_st); PyObject *exc_value = PyStackRef_AsPyObjectBorrow(exc_value_st);
#ifndef Py_TAIL_CALL_INTERP #if !Py_TAIL_CALL_INTERP
assert(throwflag); assert(throwflag);
#endif #endif
assert(exc_value && PyExceptionInstance_Check(exc_value)); assert(exc_value && PyExceptionInstance_Check(exc_value));
@ -11929,7 +11929,7 @@
} }
/* END INSTRUCTIONS */ /* END INSTRUCTIONS */
#ifndef Py_TAIL_CALL_INTERP #if !Py_TAIL_CALL_INTERP
#if USE_COMPUTED_GOTOS #if USE_COMPUTED_GOTOS
_unknown_opcode: _unknown_opcode:
#else #else

View file

@ -160,7 +160,7 @@ def generate_tier1(
#define TIER_ONE 1 #define TIER_ONE 1
""") """)
outfile.write(f""" outfile.write(f"""
#ifndef Py_TAIL_CALL_INTERP #if !Py_TAIL_CALL_INTERP
#if !USE_COMPUTED_GOTOS #if !USE_COMPUTED_GOTOS
dispatch_opcode: dispatch_opcode:
switch (opcode) switch (opcode)
@ -173,7 +173,7 @@ def generate_tier1(
generate_tier1_cases(analysis, outfile, lines) generate_tier1_cases(analysis, outfile, lines)
outfile.write(f""" outfile.write(f"""
{INSTRUCTION_END_MARKER} {INSTRUCTION_END_MARKER}
#ifndef Py_TAIL_CALL_INTERP #if !Py_TAIL_CALL_INTERP
#if USE_COMPUTED_GOTOS #if USE_COMPUTED_GOTOS
_unknown_opcode: _unknown_opcode:
#else #else