mirror of
https://github.com/python/cpython.git
synced 2025-11-01 18:51:43 +00:00
bpo-45963: Make space for the InterpreterFrame of a generator in that generator. (GH-29891)
* Make generator, coroutine and async gen structs all the same size. * Store interpreter frame in generator (and coroutine). Reduces the number of allocations neeeded for a generator from two to one.
This commit is contained in:
parent
f34d181fa1
commit
299483c95d
7 changed files with 128 additions and 145 deletions
|
|
@ -74,7 +74,7 @@ static inline void _PyFrame_StackPush(InterpreterFrame *f, PyObject *value) {
|
|||
|
||||
#define FRAME_SPECIALS_SIZE ((sizeof(InterpreterFrame)-1)/sizeof(PyObject *))
|
||||
|
||||
InterpreterFrame *_PyFrame_Copy(InterpreterFrame *frame);
|
||||
void _PyFrame_Copy(InterpreterFrame *src, InterpreterFrame *dest);
|
||||
|
||||
static inline void
|
||||
_PyFrame_InitializeSpecials(
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue