mirror of
https://github.com/python/cpython
synced 2026-09-29 12:10:30 +03:00
gh-102859: Remove JUMP_IF_FALSE_OR_POP and JUMP_IF_TRUE_OR_POP (#102870)
This commit is contained in:
parent
04adf2df39
commit
3468c768ce
15 changed files with 235 additions and 437 deletions
|
|
@ -306,8 +306,6 @@ mark_stacks(PyCodeObject *code_obj, int len)
|
|||
}
|
||||
opcode = code[i].op.code;
|
||||
switch (opcode) {
|
||||
case JUMP_IF_FALSE_OR_POP:
|
||||
case JUMP_IF_TRUE_OR_POP:
|
||||
case POP_JUMP_IF_FALSE:
|
||||
case POP_JUMP_IF_TRUE:
|
||||
{
|
||||
|
|
@ -318,16 +316,8 @@ mark_stacks(PyCodeObject *code_obj, int len)
|
|||
if (stacks[j] == UNINITIALIZED && j < i) {
|
||||
todo = 1;
|
||||
}
|
||||
if (opcode == JUMP_IF_FALSE_OR_POP ||
|
||||
opcode == JUMP_IF_TRUE_OR_POP)
|
||||
{
|
||||
target_stack = next_stack;
|
||||
next_stack = pop_value(next_stack);
|
||||
}
|
||||
else {
|
||||
next_stack = pop_value(next_stack);
|
||||
target_stack = next_stack;
|
||||
}
|
||||
next_stack = pop_value(next_stack);
|
||||
target_stack = next_stack;
|
||||
assert(stacks[j] == UNINITIALIZED || stacks[j] == target_stack);
|
||||
stacks[j] = target_stack;
|
||||
stacks[i+1] = next_stack;
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue