diff options
author | Mark Shannon <mark@hotpy.org> | 2025-03-20 15:39:38 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-20 15:39:38 +0000 |
commit | 7ebd71ee14a497bb5dc7a693dd00f074a9f4831f (patch) | |
tree | 15c6214a266592b9ade709dd45c818a5f972f0a4 /Python/optimizer_cases.c.h | |
parent | 443c0cd17c5b0c71ee45c3621777454c6b8b0cbd (diff) | |
download | cpython-7ebd71ee14a497bb5dc7a693dd00f074a9f4831f.tar.gz cpython-7ebd71ee14a497bb5dc7a693dd00f074a9f4831f.zip |
GH-131498: Remove conditional stack effects (GH-131499)
* Adds some missing #includes
Diffstat (limited to 'Python/optimizer_cases.c.h')
-rw-r--r-- | Python/optimizer_cases.c.h | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Python/optimizer_cases.c.h b/Python/optimizer_cases.c.h index 3f315901a5b..fc70ee31a80 100644 --- a/Python/optimizer_cases.c.h +++ b/Python/optimizer_cases.c.h @@ -921,11 +921,15 @@ } case _PUSH_NULL_CONDITIONAL: { - JitOptSymbol *null = NULL; - int opcode = (oparg & 1) ? _PUSH_NULL : _NOP; - REPLACE_OP(this_instr, opcode, 0, 0); - null = sym_new_null(ctx); - if (oparg & 1) stack_pointer[0] = null; + JitOptSymbol **null; + null = &stack_pointer[0]; + if (oparg & 1) { + REPLACE_OP(this_instr, _PUSH_NULL, 0, 0); + null[0] = sym_new_null(ctx); + } + else { + REPLACE_OP(this_instr, _NOP, 0, 0); + } stack_pointer += (oparg & 1); assert(WITHIN_STACK_BOUNDS()); break; |