GH-105848: Simplify the arrangement of CALL's stack (GH-107788)

This commit is contained in:
Brandt Bucher 2023-08-09 11:19:39 -07:00 committed by GitHub
parent 0a7f48b9a8
commit a9caf9cf90
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
16 changed files with 627 additions and 682 deletions

View file

@ -1536,10 +1536,10 @@ optimize_basic_block(PyObject *const_cache, basicblock *bb, PyObject *consts)
break;
case KW_NAMES:
break;
case PUSH_NULL:
if (nextop == LOAD_GLOBAL && (inst[1].i_opcode & 1) == 0) {
INSTR_SET_OP0(inst, NOP);
inst[1].i_oparg |= 1;
case LOAD_GLOBAL:
if (nextop == PUSH_NULL && (oparg & 1) == 0) {
INSTR_SET_OP1(inst, LOAD_GLOBAL, oparg | 1);
INSTR_SET_OP0(&bb->b_instr[i + 1], NOP);
}
break;
case COMPARE_OP: