From: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Date: Thu, 6 Nov 2025 22:02:45 +0000 (+0000) Subject: cleanup X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=3f212a45982180aa9601b5957f18ee3af9cbfe06;p=thirdparty%2FPython%2Fcpython.git cleanup --- diff --git a/Include/internal/pycore_ceval.h b/Include/internal/pycore_ceval.h index 02da61952256..33b9fd053f70 100644 --- a/Include/internal/pycore_ceval.h +++ b/Include/internal/pycore_ceval.h @@ -334,10 +334,9 @@ _PyEval_SpecialMethodCanSuggest(PyObject *self, int oparg); #define _PY_EVAL_PLEASE_STOP_BIT (1U << 5) #define _PY_EVAL_EXPLICIT_MERGE_BIT (1U << 6) #define _PY_EVAL_JIT_INVALIDATE_COLD_BIT (1U << 7) -#define _PY_EVAL_JIT_DO_NOT_REENTER (1U << 8) /* Reserve a few bits for future use */ -#define _PY_EVAL_EVENTS_BITS 9 +#define _PY_EVAL_EVENTS_BITS 8 #define _PY_EVAL_EVENTS_MASK ((1 << _PY_EVAL_EVENTS_BITS)-1) static inline void diff --git a/Python/bytecodes.c b/Python/bytecodes.c index 318443daebc8..2e720d3fb300 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -3049,8 +3049,7 @@ dummy_func( /* If the eval breaker is set then stay in tier 1. * This avoids any potentially infinite loops * involving _RESUME_CHECK */ - if (_Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & (_PY_EVAL_EVENTS_MASK | _PY_EVAL_JIT_DO_NOT_REENTER)) { - _Py_unset_eval_breaker_bit(tstate, _PY_EVAL_JIT_DO_NOT_REENTER); + if (_Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & _PY_EVAL_EVENTS_MASK) { opcode = executor->vm_data.opcode; oparg = (oparg & ~255) | executor->vm_data.oparg; next_instr = this_instr; diff --git a/Python/ceval_macros.h b/Python/ceval_macros.h index e12040bcc848..a8290242a5c1 100644 --- a/Python/ceval_macros.h +++ b/Python/ceval_macros.h @@ -401,10 +401,6 @@ do { \ next_instr = frame->instr_ptr + 1; \ JUMP_TO_LABEL(error); \ } \ - /* Progress made */ \ - if (next_instr != this_instr) { \ - _Py_unset_eval_breaker_bit(tstate, _PY_EVAL_JIT_DO_NOT_REENTER); \ - } \ if (keep_tracing_bit) { \ assert(tstate->interp->jit_state.code_curr_size == 2 || tstate->interp->jit_state.code_curr_size == 3); \ ENTER_TRACING(); \ diff --git a/Python/generated_cases.c.h b/Python/generated_cases.c.h index c97a6a9dad8b..e500ec93fff4 100644 --- a/Python/generated_cases.c.h +++ b/Python/generated_cases.c.h @@ -5509,8 +5509,7 @@ assert(executor->vm_data.code == code); assert(executor->vm_data.valid); assert(tstate->current_executor == NULL); - if (_Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & (_PY_EVAL_EVENTS_MASK | _PY_EVAL_JIT_DO_NOT_REENTER)) { - _Py_unset_eval_breaker_bit(tstate, _PY_EVAL_JIT_DO_NOT_REENTER); + if (_Py_atomic_load_uintptr_relaxed(&tstate->eval_breaker) & _PY_EVAL_EVENTS_MASK) { opcode = executor->vm_data.opcode; oparg = (oparg & ~255) | executor->vm_data.oparg; next_instr = this_instr;