diff options
author | Brandt Bucher <brandt@python.org> | 2022-01-04 19:38:32 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-01-04 19:38:32 (GMT) |
commit | 31e43cbe5f01cdd5b5ab330ec3040920e8b61a91 (patch) | |
tree | d1fe86279c419ff34eae29c77a538b1d053f47cc /Objects | |
parent | f404e26d749c85eef7b5be836375260855050ee3 (diff) | |
download | cpython-31e43cbe5f01cdd5b5ab330ec3040920e8b61a91.zip cpython-31e43cbe5f01cdd5b5ab330ec3040920e8b61a91.tar.gz cpython-31e43cbe5f01cdd5b5ab330ec3040920e8b61a91.tar.bz2 |
bpo-46009: Remove GEN_START (GH-30367)
Diffstat (limited to 'Objects')
-rw-r--r-- | Objects/frameobject.c | 8 |
1 files changed, 5 insertions, 3 deletions
diff --git a/Objects/frameobject.c b/Objects/frameobject.c index 078fcfc..4dd2183 100644 --- a/Objects/frameobject.c +++ b/Objects/frameobject.c @@ -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])); |