Skip to content
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Naming
  • Loading branch information
brandtbucher committed May 20, 2025
commit 101955f463e555d67c8805bcb6f02034907798d8
6 changes: 3 additions & 3 deletions Python/optimizer_analysis.c
Original file line number Diff line number Diff line change
Expand Up @@ -530,7 +530,7 @@ const uint16_t op_without_pop[MAX_UOP_ID] = {
[_POP_TWO_LOAD_CONST_INLINE_BORROW] = _POP_TOP_LOAD_CONST_INLINE_BORROW,
};

const uint16_t remove_push[MAX_UOP_ID] = {
const uint16_t op_without_push[MAX_UOP_ID] = {
[_COPY] = _NOP,
[_LOAD_CONST_INLINE] = _NOP,
[_LOAD_CONST_INLINE_BORROW] = _NOP,
Expand Down Expand Up @@ -581,10 +581,10 @@ remove_unneeded_uops(_PyUOpInstruction *buffer, int buffer_size)
while (last->opcode == _NOP) {
last--;
}
if (!remove_push[last->opcode]) {
if (!op_without_push[last->opcode]) {
break;
}
last->opcode = remove_push[last->opcode];
last->opcode = op_without_push[last->opcode];
opcode = buffer[pc].opcode = op_without_pop[opcode];
}
/* _PUSH_FRAME doesn't escape or error, but it
Expand Down