mirror of
https://github.com/python/cpython.git
synced 2025-11-01 10:45:30 +00:00
bpo-46409: Make generators in bytecode (GH-30633)
* Add RETURN_GENERATOR and JUMP_NO_INTERRUPT opcodes. * Trim frame and generator by word each. * Minor refactor of frame.c * Update test.test_sys to account for smaller frames. * Treat generator functions as normal functions when evaluating and specializing.
This commit is contained in:
parent
d05a66339b
commit
b04dfbbe4b
18 changed files with 236 additions and 205 deletions
|
|
@ -13,7 +13,6 @@ extern "C" {
|
|||
and coroutine objects. */
|
||||
#define _PyGenObject_HEAD(prefix) \
|
||||
PyObject_HEAD \
|
||||
/* Note: gi_frame can be NULL if the generator is "finished" */ \
|
||||
/* The code object backing the generator */ \
|
||||
PyCodeObject *prefix##_code; \
|
||||
/* List of weak reference. */ \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue