summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2023-12-13 12:31:41 (GMT)
committerGitHub <noreply@github.com>2023-12-13 12:31:41 (GMT)
commit9263173280d7ce949911965efa5b745287c581b2 (patch)
tree627ff06c391d6a1dd151ddce4bc602e8a969ea05
parent2a3c37c273762d2dc40bfdae3899cb09b7c88d4a (diff)
downloadcpython-9263173280d7ce949911965efa5b745287c581b2.zip
cpython-9263173280d7ce949911965efa5b745287c581b2.tar.gz
cpython-9263173280d7ce949911965efa5b745287c581b2.tar.bz2
Fix whitespace in generated code
-rw-r--r--Python/executor_cases.c.h12
-rw-r--r--Tools/cases_generator/tier2_generator.py7
2 files changed, 10 insertions, 9 deletions
diff --git a/Python/executor_cases.c.h b/Python/executor_cases.c.h
index 9dda3c9..14d9dd6 100644
--- a/Python/executor_cases.c.h
+++ b/Python/executor_cases.c.h
@@ -1842,7 +1842,7 @@
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);
@@ -2546,7 +2546,7 @@
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);
@@ -2566,7 +2566,7 @@
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);
@@ -2585,7 +2585,7 @@
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);
@@ -2601,7 +2601,7 @@
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);
@@ -2630,7 +2630,7 @@
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);
diff --git a/Tools/cases_generator/tier2_generator.py b/Tools/cases_generator/tier2_generator.py
index d2b5039..a22fb6d 100644
--- a/Tools/cases_generator/tier2_generator.py
+++ b/Tools/cases_generator/tier2_generator.py
@@ -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):