]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
A few more cases_generator cleanups (#112220)
authorGuido van Rossum <guido@python.org>
Fri, 17 Nov 2023 22:36:37 +0000 (14:36 -0800)
committerGitHub <noreply@github.com>
Fri, 17 Nov 2023 22:36:37 +0000 (22:36 +0000)
Tools/cases_generator/flags.py
Tools/cases_generator/generate_cases.py

index 808c9e82bbce07805b10e2d6f5bdbf73c582dd75..bf76112159e38e3ee0d5d055281c77805988f70c 100644 (file)
@@ -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":
index d1dbfeae8d74f69b3fcf827511d9dc8e915e1bb0..ba45e3a625072e06f45d66e074cbb0c3cd92f299 100644 (file)
@@ -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: