mirror of
https://github.com/python/cpython.git
synced 2025-08-03 00:23:06 +00:00
GH-99104: Update headers for bytecodes.c and generate_cases.py (#99112)
Also tweak the labels near the end of bytecodes.c.
This commit is contained in:
parent
6a8d3c57af
commit
d04899abb0
3 changed files with 19 additions and 9 deletions
|
@ -6,6 +6,7 @@
|
|||
|
||||
import argparse
|
||||
import io
|
||||
import os
|
||||
import re
|
||||
import sys
|
||||
|
||||
|
@ -67,7 +68,7 @@ def write_cases(f: io.TextIOBase, instrs: list[InstDef]):
|
|||
for target in re.findall(r"(?:PREDICT|GO_TO_INSTRUCTION)\((\w+)\)", inst.block.text):
|
||||
predictions.add(target)
|
||||
indent = " "
|
||||
f.write("// This file is generated by Tools/scripts/generate_cases.py\n")
|
||||
f.write(f"// This file is generated by {os.path.relpath(__file__)}\n")
|
||||
f.write("// Do not edit!\n")
|
||||
for instr in instrs:
|
||||
assert isinstance(instr, InstDef)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue