diff options
author | Mark Shannon <mark@hotpy.org> | 2023-02-13 11:24:55 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-02-13 11:24:55 +0000 |
commit | 160f2fe2b90ed5ec7838cb4141dd35768422891f (patch) | |
tree | 2d9617e40227da45aa8e3c4452eaa0f389a0d879 /Include/internal/pycore_code.h | |
parent | a1f08f5f19753c7c9295f51b5ae1262c7a1c838f (diff) | |
download | cpython-git-160f2fe2b90ed5ec7838cb4141dd35768422891f.tar.gz |
GH-87849: Simplify stack effect of SEND and specialize it for generators and coroutines. (GH-101788)
Diffstat (limited to 'Include/internal/pycore_code.h')
-rw-r--r-- | Include/internal/pycore_code.h | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/Include/internal/pycore_code.h b/Include/internal/pycore_code.h index a287250acc..10f1e320a1 100644 --- a/Include/internal/pycore_code.h +++ b/Include/internal/pycore_code.h @@ -92,6 +92,12 @@ typedef struct { #define INLINE_CACHE_ENTRIES_FOR_ITER CACHE_ENTRIES(_PyForIterCache) +typedef struct { + uint16_t counter; +} _PySendCache; + +#define INLINE_CACHE_ENTRIES_SEND CACHE_ENTRIES(_PySendCache) + // Borrowed references to common callables: struct callable_cache { PyObject *isinstance; @@ -233,6 +239,7 @@ extern void _Py_Specialize_CompareAndBranch(PyObject *lhs, PyObject *rhs, extern void _Py_Specialize_UnpackSequence(PyObject *seq, _Py_CODEUNIT *instr, int oparg); extern void _Py_Specialize_ForIter(PyObject *iter, _Py_CODEUNIT *instr, int oparg); +extern void _Py_Specialize_Send(PyObject *receiver, _Py_CODEUNIT *instr); /* Finalizer function for static codeobjects used in deepfreeze.py */ extern void _PyStaticCode_Fini(PyCodeObject *co); |