gh-105481: the ENABLE_SPECIALIZATION flag does not need to be generated by the build script, or exposed in opcode.py (#107534)

This commit is contained in:
Irit Katriel 2023-08-01 18:05:00 +01:00 • committed by GitHub
parent 49f238e78c
commit 6ef8f8ca88
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 21 additions and 12 deletions

View file

@ -73,7 +73,6 @@ def main(opcode_py,
opname = opcode['opname']
is_pseudo = opcode['is_pseudo']
ENABLE_SPECIALIZATION = opcode["ENABLE_SPECIALIZATION"]
MIN_PSEUDO_OPCODE = opcode["MIN_PSEUDO_OPCODE"]
MAX_PSEUDO_OPCODE = opcode["MAX_PSEUDO_OPCODE"]
MIN_INSTRUMENTED_OPCODE = opcode["MIN_INSTRUMENTED_OPCODE"]
@ -141,10 +140,6 @@ def main(opcode_py,
for i, (op, _) in enumerate(opcode["_nb_ops"]):
fobj.write(DEFINE.format(op, i))
fobj.write("\n")
fobj.write("/* Defined in Lib/opcode.py */\n")
fobj.write(f"#define ENABLE_SPECIALIZATION {int(ENABLE_SPECIALIZATION)}")
iobj.write("\n")
iobj.write(f"\nextern const char *const _PyOpcode_OpName[{NUM_OPCODES}];\n")
iobj.write("\n#ifdef NEED_OPCODE_TABLES\n")