mirror of
https://github.com/python/cpython.git
synced 2025-08-04 00:48:58 +00:00
bpo-44525: Copy free variables in bytecode to allow calls to inner functions to be specialized (GH-29595)
* Make internal APIs that take PyFrameConstructor take a PyFunctionObject instead. * Add reference to function to frame, borrow references to builtins and globals. * Add COPY_FREE_VARS instruction to allow specialization of calls to inner functions.
This commit is contained in:
parent
d82f2caf94
commit
135cabd328
25 changed files with 268 additions and 156 deletions
|
@ -52,7 +52,7 @@ _PyEval_EvalFrame(PyThreadState *tstate, struct _interpreter_frame *frame, int t
|
|||
|
||||
extern PyObject *
|
||||
_PyEval_Vector(PyThreadState *tstate,
|
||||
PyFrameConstructor *desc, PyObject *locals,
|
||||
PyFunctionObject *func, PyObject *locals,
|
||||
PyObject* const* args, size_t argcount,
|
||||
PyObject *kwnames);
|
||||
|
||||
|
@ -113,7 +113,7 @@ static inline void _Py_LeaveRecursiveCall_inline(void) {
|
|||
|
||||
struct _interpreter_frame *_PyEval_GetFrame(void);
|
||||
|
||||
PyObject *_Py_MakeCoro(PyFrameConstructor *, struct _interpreter_frame *);
|
||||
PyObject *_Py_MakeCoro(PyFunctionObject *func, struct _interpreter_frame *);
|
||||
|
||||
#ifdef __cplusplus
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue