mirror of
https://github.com/python/cpython.git
synced 2025-08-22 17:55:18 +00:00
GH-128914: Remove conditional stack effects from bytecodes.c
and the code generators (GH-128918)
This commit is contained in:
parent
0a6412f9cc
commit
ab61d3f430
44 changed files with 1460 additions and 1679 deletions
|
@ -1261,27 +1261,18 @@ mark_stacks(PyCodeObject *code_obj, int len)
|
|||
stacks[next_i] = next_stack;
|
||||
break;
|
||||
case LOAD_GLOBAL:
|
||||
{
|
||||
int j = oparg;
|
||||
next_stack = push_value(next_stack, Object);
|
||||
if (j & 1) {
|
||||
next_stack = push_value(next_stack, Null);
|
||||
}
|
||||
stacks[next_i] = next_stack;
|
||||
break;
|
||||
}
|
||||
case LOAD_ATTR:
|
||||
{
|
||||
assert(top_of_stack(next_stack) == Object);
|
||||
int j = oparg;
|
||||
if (j & 1) {
|
||||
next_stack = pop_value(next_stack);
|
||||
next_stack = push_value(next_stack, Object);
|
||||
next_stack = push_value(next_stack, Null);
|
||||
}
|
||||
stacks[next_i] = next_stack;
|
||||
break;
|
||||
}
|
||||
case LOAD_METHOD:
|
||||
assert(top_of_stack(next_stack) == Object);
|
||||
next_stack = push_value(next_stack, Null);
|
||||
stacks[next_i] = next_stack;
|
||||
break;
|
||||
case SWAP:
|
||||
{
|
||||
int n = oparg;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue