Skip to content

Commit 9cee967

Browse files
Fix indentation
1 parent ef5b7c8 commit 9cee967

File tree

2 files changed

+120
-120
lines changed

2 files changed

+120
-120
lines changed

Python/optimizer_cases.c.h

Lines changed: 112 additions & 112 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

Tools/cases_generator/optimizer_generator.py

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -247,14 +247,14 @@ def replace_opcode_if_evaluates_pure(
247247
if input_count in input_count_to_uop:
248248
replacement_uop = input_count_to_uop[input_count]
249249
input_desc = "one input" if input_count == 1 else "two inputs"
250-
emitter.emit(textwrap.dedent(f"""
251-
if (sym_is_const(ctx, {outp.name})) {{
252-
PyObject *result = sym_get_const(ctx, {outp.name});
253-
if (_Py_IsImmortal(result)) {{
254-
// Replace with {replacement_uop} since we have {input_desc} and an immortal result
255-
REPLACE_OP(this_instr, {replacement_uop}, 0, (uintptr_t)result);
256-
}}
257-
}}"""))
250+
emitter.emit(f"""
251+
if (sym_is_const(ctx, {outp.name})) {{
252+
PyObject *result = sym_get_const(ctx, {outp.name});
253+
if (_Py_IsImmortal(result)) {{
254+
// Replace with {replacement_uop} since we have {input_desc} and an immortal result
255+
REPLACE_OP(this_instr, {replacement_uop}, 0, (uintptr_t)result);
256+
}}
257+
}}""")
258258

259259
storage.flush(self.out)
260260
emitter.emit("break;\n")

0 commit comments

Comments
 (0)