]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
cleanup a little
authorKen Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Thu, 16 Oct 2025 21:01:51 +0000 (22:01 +0100)
committerKen Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Thu, 16 Oct 2025 21:01:51 +0000 (22:01 +0100)
Python/optimizer.c

index e4b29124d17a140751e6e3d58240e38652ae2204..532881aef92fd60ca261fe49626d42a9042ef986 100644 (file)
@@ -585,14 +585,6 @@ _PyJIT_translate_single_bytecode_to_trace(
 
     DPRINTF(2, "%d: %s(%d)\n", target, _PyOpcode_OpName[opcode], oparg);
 
-    // TODO support EXTENDED_ARG
-    if (oparg > 255) {
-        goto unsupported;
-    }
-
-    if (opcode == EXTENDED_ARG) {
-        return 1;
-    }
     if (opcode == NOP) {
         return 1;
     }
@@ -626,6 +618,9 @@ _PyJIT_translate_single_bytecode_to_trace(
 
     // Strange control-flow, unsupported opcode, etc.
     if (jump_taken ||
+        // TODO handle extended args.
+        oparg > 255 ||
+        opcode == EXTENDED_ARG ||
         opcode == WITH_EXCEPT_START || opcode == RERAISE || opcode == CLEANUP_THROW || opcode == PUSH_EXC_INFO ||
         frame->owner >= FRAME_OWNED_BY_INTERPRETER ||
         // This can be supported, but requires a tracing shim frame.