Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions Modules/_testinternalcapi/test_targets.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Python/opcode_targets.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

4 changes: 4 additions & 0 deletions Tools/cases_generator/target_generator.py
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,9 @@ def function_proto(name: str) -> str:
def write_tailcall_dispatch_table(analysis: Analysis, out: CWriter) -> None:
out.emit("static py_tail_call_funcptr instruction_funcptr_handler_table[256];\n")
out.emit("\n")
out.emit("#if _Py_TIER2\n")
out.emit("static py_tail_call_funcptr instruction_funcptr_tracing_table[256];\n")
out.emit("#endif\n")
out.emit("\n")

# Emit function prototypes for labels.
Expand Down Expand Up @@ -82,6 +84,7 @@ def write_tailcall_dispatch_table(analysis: Analysis, out: CWriter) -> None:
out.emit("};\n")

# Emit the tracing dispatch table.
out.emit("#if _Py_TIER2\n")
out.emit("static py_tail_call_funcptr instruction_funcptr_tracing_table[256] = {\n")
for name in sorted(analysis.instructions.keys()):
out.emit(f"[{name}] = _TAIL_CALL_TRACE_RECORD,\n")
Expand All @@ -90,6 +93,7 @@ def write_tailcall_dispatch_table(analysis: Analysis, out: CWriter) -> None:
if rest not in named_values:
out.emit(f"[{rest}] = _TAIL_CALL_UNKNOWN_OPCODE,\n")
out.emit("};\n")
out.emit("#endif\n")
outfile.write("#endif /* _Py_TAIL_CALL_INTERP */\n")

arg_parser = argparse.ArgumentParser(
Expand Down
Loading