GH-87849: Simplify stack effect of SEND and specialize it for generators and coroutines. (GH-101788)

This commit is contained in:
Mark Shannon 2023-02-13 11:24:55 +00:00 committed by GitHub
parent a1f08f5f19
commit 160f2fe2b9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
15 changed files with 191 additions and 105 deletions

View file

@ -334,10 +334,10 @@ mark_stacks(PyCodeObject *code_obj, int len)
break;
}
case SEND:
j = get_arg(code, i) + i + 1;
j = get_arg(code, i) + i + INLINE_CACHE_ENTRIES_SEND + 1;
assert(j < len);
assert(stacks[j] == UNINITIALIZED || stacks[j] == pop_value(next_stack));
stacks[j] = pop_value(next_stack);
assert(stacks[j] == UNINITIALIZED || stacks[j] == next_stack);
stacks[j] = next_stack;
stacks[i+1] = next_stack;
break;
case JUMP_FORWARD: