diff options
author | Dennis Sweeney <36520290+sweeneyde@users.noreply.github.com> | 2023-12-01 00:35:49 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-12-01 00:35:49 (GMT) |
commit | a99305e7fbbc9e67a50091583ac1e1e625963663 (patch) | |
tree | 5e841bfc744117c80890e112d84e892f26a5e763 /Python/flowgraph.c | |
parent | 4c9da4c964a62c2972fa40b30ab11f19f89178f4 (diff) | |
download | cpython-a99305e7fbbc9e67a50091583ac1e1e625963663.zip cpython-a99305e7fbbc9e67a50091583ac1e1e625963663.tar.gz cpython-a99305e7fbbc9e67a50091583ac1e1e625963663.tar.bz2 |
[3.12] gh-112356: LOAD_GLOBAL can only include one PUSH_NULL (#112566)
Diffstat (limited to 'Python/flowgraph.c')
-rw-r--r-- | Python/flowgraph.c | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/Python/flowgraph.c b/Python/flowgraph.c index afcae31..b53e771 100644 --- a/Python/flowgraph.c +++ b/Python/flowgraph.c @@ -1554,9 +1554,9 @@ optimize_basic_block(PyObject *const_cache, basicblock *bb, PyObject *consts) case KW_NAMES: break; case PUSH_NULL: - if (nextop == LOAD_GLOBAL && (inst[1].i_opcode & 1) == 0) { + if (nextop == LOAD_GLOBAL && (bb->b_instr[i+1].i_oparg & 1) == 0) { INSTR_SET_OP0(inst, NOP); - inst[1].i_oparg |= 1; + bb->b_instr[i+1].i_oparg |= 1; } break; default: |