mirror of
https://github.com/python/cpython.git
synced 2025-08-03 08:34:29 +00:00
bpo-46009: Remove GEN_START (GH-30367)
This commit is contained in:
parent
f404e26d74
commit
31e43cbe5f
10 changed files with 20 additions and 47 deletions
|
@ -192,6 +192,11 @@ mark_stacks(PyCodeObject *code_obj, int len)
|
|||
stacks[i] = UNINITIALIZED;
|
||||
}
|
||||
stacks[0] = 0;
|
||||
if (code_obj->co_flags & (CO_GENERATOR | CO_COROUTINE | CO_ASYNC_GENERATOR))
|
||||
{
|
||||
// Generators get sent None while starting:
|
||||
stacks[0] = push_value(stacks[0], Object);
|
||||
}
|
||||
int todo = 1;
|
||||
while (todo) {
|
||||
todo = 0;
|
||||
|
@ -291,9 +296,6 @@ mark_stacks(PyCodeObject *code_obj, int len)
|
|||
case RERAISE:
|
||||
/* End of block */
|
||||
break;
|
||||
case GEN_START:
|
||||
stacks[i+1] = next_stack;
|
||||
break;
|
||||
default:
|
||||
{
|
||||
int delta = PyCompile_OpcodeStackEffect(opcode, _Py_OPARG(code[i]));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue