From 02f1fb404e2e9d3e8a6ac58403442ab294fb8813 Mon Sep 17 00:00:00 2001 From: Ken Jin <28750310+Fidget-Spinner@users.noreply.github.com> Date: Wed, 24 Sep 2025 12:22:17 +0100 Subject: [PATCH] fix non-sstandard C --- Python/optimizer.c | 20 +++++++++++--------- 1 file changed, 11 insertions(+), 9 deletions(-) diff --git a/Python/optimizer.c b/Python/optimizer.c index c8a0a3cb74ed..382a3150793e 100644 --- a/Python/optimizer.c +++ b/Python/optimizer.c @@ -620,15 +620,17 @@ _PyJIT_translate_single_bytecode_to_trace( if (jump_taken || opcode == WITH_EXCEPT_START || opcode == RERAISE || opcode == CLEANUP_THROW || opcode == PUSH_EXC_INFO) { unsupported: - // Rewind to previous instruction and replace with _EXIT_TRACE. - _PyUOpInstruction *curr = &trace[trace_length-1]; - while (curr->opcode != _SET_IP && trace_length > 1) { - trace_length--; - curr = &trace[trace_length-1]; - } - assert(curr->opcode == _SET_IP || trace_length == 1); - curr->opcode = _EXIT_TRACE; - goto done; + { + // Rewind to previous instruction and replace with _EXIT_TRACE. + _PyUOpInstruction *curr = &trace[trace_length-1]; + while (curr->opcode != _SET_IP && trace_length > 1) { + trace_length--; + curr = &trace[trace_length-1]; + } + assert(curr->opcode == _SET_IP || trace_length == 1); + curr->opcode = _EXIT_TRACE; + goto done; + } } RESERVE_RAW(expansion->nuops + needs_guard_ip + 3, "uop and various checks"); -- 2.47.3