diff options
author | Mark Shannon <mark@hotpy.org> | 2025-03-20 15:39:38 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2025-03-20 15:39:38 (GMT) |
commit | 7ebd71ee14a497bb5dc7a693dd00f074a9f4831f (patch) | |
tree | 15c6214a266592b9ade709dd45c818a5f972f0a4 /Python/optimizer_bytecodes.c | |
parent | 443c0cd17c5b0c71ee45c3621777454c6b8b0cbd (diff) | |
download | cpython-7ebd71ee14a497bb5dc7a693dd00f074a9f4831f.zip cpython-7ebd71ee14a497bb5dc7a693dd00f074a9f4831f.tar.gz cpython-7ebd71ee14a497bb5dc7a693dd00f074a9f4831f.tar.bz2 |
GH-131498: Remove conditional stack effects (GH-131499)
* Adds some missing #includes
Diffstat (limited to 'Python/optimizer_bytecodes.c')
-rw-r--r-- | Python/optimizer_bytecodes.c | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/Python/optimizer_bytecodes.c b/Python/optimizer_bytecodes.c index ea7c39b..cfa0a73 100644 --- a/Python/optimizer_bytecodes.c +++ b/Python/optimizer_bytecodes.c @@ -546,10 +546,14 @@ dummy_func(void) { } } - op (_PUSH_NULL_CONDITIONAL, ( -- null if (oparg & 1))) { - int opcode = (oparg & 1) ? _PUSH_NULL : _NOP; - REPLACE_OP(this_instr, opcode, 0, 0); - null = sym_new_null(ctx); + op (_PUSH_NULL_CONDITIONAL, ( -- null[oparg & 1])) { + 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); + } } op(_LOAD_ATTR, (owner -- attr, self_or_null[oparg&1])) { @@ -765,7 +769,7 @@ dummy_func(void) { Py_UNREACHABLE(); } - op(_PUSH_FRAME, (new_frame: _Py_UOpsAbstractFrame * -- unused if (0))) { + op(_PUSH_FRAME, (new_frame: _Py_UOpsAbstractFrame * -- )) { SYNC_SP(); ctx->frame->stack_pointer = stack_pointer; ctx->frame = new_frame; |