mirror of
https://github.com/python/cpython.git
synced 2025-07-09 20:35:26 +00:00
[3.12] gh-112356: LOAD_GLOBAL can only include one PUSH_NULL (#112566)
This commit is contained in:
parent
4c9da4c964
commit
a99305e7fb
3 changed files with 24 additions and 2 deletions
|
@ -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:
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue