]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
restore non-jit builds
authorKen Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Sat, 18 Oct 2025 22:12:55 +0000 (23:12 +0100)
committerKen Jin <28750310+Fidget-Spinner@users.noreply.github.com>
Sat, 18 Oct 2025 22:12:55 +0000 (23:12 +0100)
Python/opcode_targets.h
Tools/cases_generator/target_generator.py

index 299739764919bb91cd1e210bdfa87d72769064da..66abd6d4623e1c8b186553aae2def47ab4b84ee9 100644 (file)
@@ -257,6 +257,7 @@ static void *opcode_targets_table[256] = {
     &&TARGET_INSTRUMENTED_LINE,
     &&TARGET_ENTER_EXECUTOR,
 };
+#if _Py_TIER2
 static void *opcode_tracing_targets_table[256] = {
     &&TARGET_TRACING_CACHE,
     &&TARGET_TRACING_BINARY_SLICE,
@@ -515,6 +516,7 @@ static void *opcode_tracing_targets_table[256] = {
     &&TARGET_TRACING_INSTRUMENTED_LINE,
     &&TARGET_TRACING_ENTER_EXECUTOR,
 };
+#endif
 #else /* _Py_TAIL_CALL_INTERP */
 static py_tail_call_funcptr instruction_funcptr_handler_table[256];
 
index b6570d202d847dc393359e16641d0c163d360da8..8e5dc10f759a156a6612f9789f9cc170bbb66c8e 100644 (file)
@@ -35,10 +35,12 @@ def write_opcode_targets(analysis: Analysis, out: CWriter) -> None:
     for name, op in analysis.opmap.items():
         if op < 256:
             targets[op] = f"&&TARGET_TRACING_{name},\n"
+    out.emit("#if _Py_TIER2\n")
     out.emit("static void *opcode_tracing_targets_table[256] = {\n")
     for target in targets:
         out.emit(target)
     out.emit("};\n")
+    out.emit(f"#endif\n")
     out.emit("#else /* _Py_TAIL_CALL_INTERP */\n")
 
 def function_proto(name: str) -> str: