Skip to content

Commit ab58719

Browse files
committed
Fix printing of input filenames
1 parent 12f9c3c commit ab58719

File tree

9 files changed

+11
-11
lines changed

9 files changed

+11
-11
lines changed

Include/internal/pycore_uop_ids.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Include/opcode_ids.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/executor_cases.c.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Python/generated_cases.c.h

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tools/cases_generator/generators_common.py

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -22,14 +22,14 @@
2222

2323

2424
def root_relative_path(filename: str) -> str:
25-
return Path(filename).relative_to(ROOT).as_posix()
25+
return Path(filename).absolute().relative_to(ROOT).as_posix()
2626

2727

28-
def write_header(generator: str, source: str, outfile: TextIO) -> None:
28+
def write_header(generator: str, sources: list[str], outfile: TextIO) -> None:
2929
outfile.write(
3030
f"""// This file is generated by {root_relative_path(generator)}
3131
// from:
32-
// {source}
32+
// {", ".join(root_relative_path(src) for src in sources)}
3333
// Do not edit!
3434
"""
3535
)

Tools/cases_generator/opcode_id_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@
2424
DEFAULT_OUTPUT = ROOT / "Include/opcode_ids.h"
2525

2626

27-
def generate_opcode_header(filenames: str, analysis: Analysis, outfile: TextIO) -> None:
27+
def generate_opcode_header(filenames: list[str], analysis: Analysis, outfile: TextIO) -> None:
2828
write_header(__file__, filenames, outfile)
2929
out = CWriter(outfile, 0, False)
3030
out.emit("\n")

Tools/cases_generator/tier1_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -114,7 +114,7 @@ def uses_this(inst: Instruction) -> bool:
114114

115115

116116
def generate_tier1(
117-
filenames: str, analysis: Analysis, outfile: TextIO, lines: bool
117+
filenames: list[str], analysis: Analysis, outfile: TextIO, lines: bool
118118
) -> None:
119119
write_header(__file__, filenames, outfile)
120120
outfile.write(

Tools/cases_generator/tier2_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -137,7 +137,7 @@ def write_uop(uop: Uop, out: CWriter, stack: Stack) -> None:
137137
"_EXTENDED_ARG",)
138138

139139
def generate_tier2(
140-
filenames: str, analysis: Analysis, outfile: TextIO, lines: bool
140+
filenames: list[str], analysis: Analysis, outfile: TextIO, lines: bool
141141
) -> None:
142142
write_header(__file__, filenames, outfile)
143143
outfile.write(

Tools/cases_generator/uop_id_generator.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@
2727
OMIT = {"_CACHE", "_RESERVED", "_EXTENDED_ARG"}
2828

2929
def generate_uop_ids(
30-
filenames: str, analysis: Analysis, outfile: TextIO, distinct_namespace: bool
30+
filenames: list[str], analysis: Analysis, outfile: TextIO, distinct_namespace: bool
3131
) -> None:
3232
write_header(__file__, filenames, outfile)
3333
out = CWriter(outfile, 0, False)

0 commit comments

Comments
 (0)