]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
fix non-sstandard C
authorKen Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Wed, 24 Sep 2025 11:22:17 +0000 (12:22 +0100)
committerKen Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Wed, 24 Sep 2025 11:22:17 +0000 (12:22 +0100)
Python/optimizer.c

index c8a0a3cb74ed58d3d1deff3fa5e4e5a9074761a8..382a3150793ef35e8e46bfbcfe136b822d474369 100644 (file)
@@ -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");