]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix a bug with ENTER_EXECUTOR linking
authorKen Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Sat, 25 Oct 2025 18:04:29 +0000 (19:04 +0100)
committerKen Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Sat, 25 Oct 2025 18:04:29 +0000 (19:04 +0100)
Python/optimizer.c

index ef7e518faaed8978d8da5e83972d662c32668cbb..38fccafeda491139e21a38058ff85a36087c1878 100644 (file)
@@ -621,6 +621,10 @@ _PyJit_translate_single_bytecode_to_trace(
         return 1;
     }
 
+    if (opcode == ENTER_EXECUTOR) {
+        goto full;
+    }
+
     if (!tstate->interp->jit_state.dependencies_still_valid) {
         goto done;
     }
@@ -686,10 +690,6 @@ _PyJit_translate_single_bytecode_to_trace(
     // One for possible _DEOPT, one because _CHECK_VALIDITY itself might _DEOPT
     max_length -= 2;
 
-    if (opcode == ENTER_EXECUTOR) {
-        goto full;
-    }
-
     const struct opcode_macro_expansion *expansion = &_PyOpcode_macro_expansion[opcode];
 
     ADD_TO_TRACE(_CHECK_VALIDITY, 0, 0, target);