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:
Guido van Rossum 2022-11-04 17:40:43 -07:00 committed by GitHub
parent 6a8d3c57af
commit d04899abb0
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 19 additions and 9 deletions

View file

@ -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)