]> git.ipfire.org Git - thirdparty/Python/cpython.git/commitdiff
Fix whitespace in generated code
authorMark Shannon <mark@hotpy.org>
Wed, 13 Dec 2023 12:31:41 +0000 (12:31 +0000)
committerGitHub <noreply@github.com>
Wed, 13 Dec 2023 12:31:41 +0000 (12:31 +0000)
Python/executor_cases.c.h
Tools/cases_generator/tier2_generator.py

index 9dda3c9a743258b0fba57dc0286809503358472d..14d9dd6e95e533f041e440babc287c7075e50f5c 100644 (file)
             PyObject *null = NULL;
             oparg = CURRENT_OPARG();
             owner = stack_pointer[-1];
-            PyObject * descr = (PyObject *)CURRENT_OPERAND();
+            PyObject *descr = (PyObject *)CURRENT_OPERAND();
             STAT_INC(LOAD_ATTR, hit);
             assert(descr != NULL);
             attr = Py_NewRef(descr);
             PyObject *self = NULL;
             oparg = CURRENT_OPARG();
             owner = stack_pointer[-1];
-            PyObject * descr = (PyObject *)CURRENT_OPERAND();
+            PyObject *descr = (PyObject *)CURRENT_OPERAND();
             assert(oparg & 1);
             /* Cached method object */
             STAT_INC(LOAD_ATTR, hit);
             PyObject *self = NULL;
             oparg = CURRENT_OPARG();
             owner = stack_pointer[-1];
-            PyObject * descr = (PyObject *)CURRENT_OPERAND();
+            PyObject *descr = (PyObject *)CURRENT_OPERAND();
             assert(oparg & 1);
             assert(Py_TYPE(owner)->tp_dictoffset == 0);
             STAT_INC(LOAD_ATTR, hit);
             PyObject *attr;
             oparg = CURRENT_OPARG();
             owner = stack_pointer[-1];
-            PyObject * descr = (PyObject *)CURRENT_OPERAND();
+            PyObject *descr = (PyObject *)CURRENT_OPERAND();
             assert((oparg & 1) == 0);
             STAT_INC(LOAD_ATTR, hit);
             assert(descr != NULL);
             PyObject *attr;
             oparg = CURRENT_OPARG();
             owner = stack_pointer[-1];
-            PyObject * descr = (PyObject *)CURRENT_OPERAND();
+            PyObject *descr = (PyObject *)CURRENT_OPERAND();
             assert((oparg & 1) == 0);
             assert(Py_TYPE(owner)->tp_dictoffset == 0);
             STAT_INC(LOAD_ATTR, hit);
             PyObject *self = NULL;
             oparg = CURRENT_OPARG();
             owner = stack_pointer[-1];
-            PyObject * descr = (PyObject *)CURRENT_OPERAND();
+            PyObject *descr = (PyObject *)CURRENT_OPERAND();
             assert(oparg & 1);
             STAT_INC(LOAD_ATTR, hit);
             assert(descr != NULL);
index d2b503961aa7b905b08f163e1b34856b491d135b..a22fb6dd932503a74d7ffcc8d54757b6bc29dfe4 100644 (file)
@@ -123,10 +123,11 @@ def write_uop(uop: Uop, out: CWriter, stack: Stack) -> None:
         for cache in uop.caches:
             if cache.name != "unused":
                 if cache.size == 4:
-                    type = "PyObject *"
+                    type = cast ="PyObject *"
                 else:
-                    type = f"uint{cache.size*16}_t"
-                out.emit(f"{type} {cache.name} = ({type})CURRENT_OPERAND();\n")
+                    type = f"uint{cache.size*16}_t "
+                    cast = f"uint{cache.size*16}_t"
+                out.emit(f"{type}{cache.name} = ({cast})CURRENT_OPERAND();\n")
         emit_tokens(out, uop, stack, None, TIER2_REPLACEMENT_FUNCTIONS)
         if uop.properties.stores_sp:
             for i, var in enumerate(uop.stack.outputs):