summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGuido van Rossum <guido@python.org>2023-11-17 22:36:37 (GMT)
committerGitHub <noreply@github.com>2023-11-17 22:36:37 (GMT)
commitda314f7c8dae4f0670306f2ee8b59519a58bf346 (patch)
tree82dfd45c73a48217302566e16dd106da9eb6327f
parentcb5048ea0e4dd14be333ac4f0357a64b2a4fb89c (diff)
downloadcpython-da314f7c8dae4f0670306f2ee8b59519a58bf346.zip
cpython-da314f7c8dae4f0670306f2ee8b59519a58bf346.tar.gz
cpython-da314f7c8dae4f0670306f2ee8b59519a58bf346.tar.bz2
A few more cases_generator cleanups (#112220)
-rw-r--r--Tools/cases_generator/flags.py2
-rw-r--r--Tools/cases_generator/generate_cases.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/Tools/cases_generator/flags.py b/Tools/cases_generator/flags.py
index 808c9e8..bf76112 100644
--- a/Tools/cases_generator/flags.py
+++ b/Tools/cases_generator/flags.py
@@ -175,7 +175,7 @@ def variable_used_unspecialized(node: parsing.Node, name: str) -> bool:
tokens: list[lx.Token] = []
skipping = False
for i, token in enumerate(node.tokens):
- if token.kind == "MACRO":
+ if token.kind == "CMACRO":
text = "".join(token.text.split())
# TODO: Handle nested #if
if text == "#if":
diff --git a/Tools/cases_generator/generate_cases.py b/Tools/cases_generator/generate_cases.py
index d1dbfea..ba45e3a 100644
--- a/Tools/cases_generator/generate_cases.py
+++ b/Tools/cases_generator/generate_cases.py
@@ -658,7 +658,7 @@ class Generator(Analyzer):
if not part.instr.is_viable_uop() and "replaced" not in part.instr.annotations:
# This note just reminds us about macros that cannot
# be expanded to Tier 2 uops. It is not an error.
- # It is sometimes emitted for macros that have a
+ # Suppress it using 'replaced op(...)' for macros having
# manual translation in translate_bytecode_to_trace()
# in Python/optimizer.c.
if len(parts) > 1 or part.instr.name != name: