diff --git a/Include/internal/pycore_uop_ids.h b/Include/internal/pycore_uop_ids.h index 729e8bd9ac4712..74c7cc9cac64ae 100644 --- a/Include/internal/pycore_uop_ids.h +++ b/Include/internal/pycore_uop_ids.h @@ -67,7 +67,7 @@ extern "C" { #define _CHECK_METHOD_VERSION 335 #define _CHECK_PEP_523 336 #define _CHECK_PERIODIC 337 -#define _CHECK_PERIODIC_NOT_YIELD_FROM 338 +#define _CHECK_PERIODIC_IF_NOT_YIELD_FROM 338 #define _CHECK_STACK_SPACE 339 #define _CHECK_STACK_SPACE_OPERAND 340 #define _CHECK_VALIDITY 341 diff --git a/Include/internal/pycore_uop_metadata.h b/Include/internal/pycore_uop_metadata.h index 2161f877c312c7..ef9e7de7f47410 100644 --- a/Include/internal/pycore_uop_metadata.h +++ b/Include/internal/pycore_uop_metadata.h @@ -21,7 +21,7 @@ extern int _PyUop_num_popped(int opcode, int oparg); const uint16_t _PyUop_Flags[MAX_UOP_ID+1] = { [_NOP] = HAS_PURE_FLAG, [_CHECK_PERIODIC] = HAS_EVAL_BREAK_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG, - [_CHECK_PERIODIC_NOT_YIELD_FROM] = HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG, + [_CHECK_PERIODIC_IF_NOT_YIELD_FROM] = HAS_ARG_FLAG | HAS_EVAL_BREAK_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG, [_RESUME_CHECK] = HAS_DEOPT_FLAG, [_LOAD_FAST_CHECK] = HAS_ARG_FLAG | HAS_LOCAL_FLAG | HAS_ERROR_FLAG | HAS_ESCAPES_FLAG, [_LOAD_FAST_0] = HAS_LOCAL_FLAG | HAS_PURE_FLAG, @@ -335,7 +335,7 @@ const char *const _PyOpcode_uop_name[MAX_UOP_ID+1] = { [_CHECK_METHOD_VERSION] = "_CHECK_METHOD_VERSION", [_CHECK_PEP_523] = "_CHECK_PEP_523", [_CHECK_PERIODIC] = "_CHECK_PERIODIC", - [_CHECK_PERIODIC_NOT_YIELD_FROM] = "_CHECK_PERIODIC_NOT_YIELD_FROM", + [_CHECK_PERIODIC_IF_NOT_YIELD_FROM] = "_CHECK_PERIODIC_IF_NOT_YIELD_FROM", [_CHECK_STACK_SPACE] = "_CHECK_STACK_SPACE", [_CHECK_STACK_SPACE_OPERAND] = "_CHECK_STACK_SPACE_OPERAND", [_CHECK_VALIDITY] = "_CHECK_VALIDITY", @@ -540,7 +540,7 @@ int _PyUop_num_popped(int opcode, int oparg) return 0; case _CHECK_PERIODIC: return 0; - case _CHECK_PERIODIC_NOT_YIELD_FROM: + case _CHECK_PERIODIC_IF_NOT_YIELD_FROM: return 0; case _RESUME_CHECK: return 0; diff --git a/Python/bytecodes.c b/Python/bytecodes.c index 7f82fc2560dd65..757c3f98568f26 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -156,7 +156,7 @@ dummy_func( } } - op(_CHECK_PERIODIC_NOT_YIELD_FROM, (--)) { + op(_CHECK_PERIODIC_IF_NOT_YIELD_FROM, (--)) { if ((oparg & RESUME_OPARG_LOCATION_MASK) < RESUME_AFTER_YIELD_FROM) { _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY(); QSBR_QUIESCENT_STATE(tstate); \ @@ -179,7 +179,7 @@ dummy_func( if (tstate->tracing == 0) { uintptr_t global_version = _Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & ~_PY_EVAL_EVENTS_MASK; uintptr_t code_version = FT_ATOMIC_LOAD_UINTPTR_ACQUIRE(_PyFrame_GetCode(frame)->_co_instrumentation_version); - if (code_version != global_version && tstate->tracing == 0) { + if (code_version != global_version) { int err = _Py_Instrument(_PyFrame_GetCode(frame), tstate->interp); if (err) { ERROR_NO_POP(); @@ -193,7 +193,7 @@ dummy_func( macro(RESUME) = _MAYBE_INSTRUMENT + _QUICKEN_RESUME + - _CHECK_PERIODIC_NOT_YIELD_FROM; + _CHECK_PERIODIC_IF_NOT_YIELD_FROM; inst(RESUME_CHECK, (--)) { #if defined(__EMSCRIPTEN__) @@ -220,7 +220,7 @@ dummy_func( macro(INSTRUMENTED_RESUME) = _MAYBE_INSTRUMENT + - _CHECK_PERIODIC_NOT_YIELD_FROM + + _CHECK_PERIODIC_IF_NOT_YIELD_FROM + _MONITOR_RESUME; pseudo(LOAD_CLOSURE, (-- unused)) = { diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h index b0d1245fa95872..b03eb997f2500b 100644 --- a/Python/executor_cases.c.h +++ b/Python/executor_cases.c.h @@ -22,7 +22,7 @@ break; } - case _CHECK_PERIODIC_NOT_YIELD_FROM: { + case _CHECK_PERIODIC_IF_NOT_YIELD_FROM: { oparg = CURRENT_OPARG(); if ((oparg & RESUME_OPARG_LOCATION_MASK) < RESUME_AFTER_YIELD_FROM) { _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY(); diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h index 769050b67fea71..4a5554a68c60e9 100644 --- a/Python/generated_cases.c.h +++ b/Python/generated_cases.c.h @@ -4186,7 +4186,7 @@ if (tstate->tracing == 0) { uintptr_t global_version = _Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & ~_PY_EVAL_EVENTS_MASK; uintptr_t code_version = FT_ATOMIC_LOAD_UINTPTR_ACQUIRE(_PyFrame_GetCode(frame)->_co_instrumentation_version); - if (code_version != global_version && tstate->tracing == 0) { + if (code_version != global_version) { int err = _Py_Instrument(_PyFrame_GetCode(frame), tstate->interp); if (err) { goto error; @@ -4196,7 +4196,7 @@ } } } - // _CHECK_PERIODIC_NOT_YIELD_FROM + // _CHECK_PERIODIC_IF_NOT_YIELD_FROM { if ((oparg & RESUME_OPARG_LOCATION_MASK) < RESUME_AFTER_YIELD_FROM) { _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY(); @@ -6083,7 +6083,7 @@ if (tstate->tracing == 0) { uintptr_t global_version = _Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & ~_PY_EVAL_EVENTS_MASK; uintptr_t code_version = FT_ATOMIC_LOAD_UINTPTR_ACQUIRE(_PyFrame_GetCode(frame)->_co_instrumentation_version); - if (code_version != global_version && tstate->tracing == 0) { + if (code_version != global_version) { int err = _Py_Instrument(_PyFrame_GetCode(frame), tstate->interp); if (err) { goto error; @@ -6101,7 +6101,7 @@ } #endif /* ENABLE_SPECIALIZATION */ } - // _CHECK_PERIODIC_NOT_YIELD_FROM + // _CHECK_PERIODIC_IF_NOT_YIELD_FROM { if ((oparg & RESUME_OPARG_LOCATION_MASK) < RESUME_AFTER_YIELD_FROM) { _Py_CHECK_EMSCRIPTEN_SIGNALS_PERIODICALLY(); diff --git a/Python/optimizer_cases.c.h b/Python/optimizer_cases.c.h index eb04315b3a0d7c..866d7d95b580d4 100644 --- a/Python/optimizer_cases.c.h +++ b/Python/optimizer_cases.c.h @@ -11,7 +11,7 @@ break; } - case _CHECK_PERIODIC_NOT_YIELD_FROM: { + case _CHECK_PERIODIC_IF_NOT_YIELD_FROM: { break; }