diff options
author | Mark Shannon <mark@hotpy.org> | 2021-11-23 09:53:24 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-23 09:53:24 (GMT) |
commit | 135cabd328504e1648d17242b42b675cdbd0193b (patch) | |
tree | 4efa5418b1816ba02c206678ecfa4e2d8e8d8f14 /Include/internal/pycore_function.h | |
parent | d82f2caf942fa8b94e797a2f116ee54ec303c2df (diff) | |
download | cpython-135cabd328504e1648d17242b42b675cdbd0193b.zip cpython-135cabd328504e1648d17242b42b675cdbd0193b.tar.gz cpython-135cabd328504e1648d17242b42b675cdbd0193b.tar.bz2 |
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.
Diffstat (limited to 'Include/internal/pycore_function.h')
-rw-r--r-- | Include/internal/pycore_function.h | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/Include/internal/pycore_function.h b/Include/internal/pycore_function.h new file mode 100644 index 0000000..dc4422d --- /dev/null +++ b/Include/internal/pycore_function.h @@ -0,0 +1,11 @@ +#ifndef Py_INTERNAL_FUNCTION_H +#define Py_INTERNAL_FUNCTION_H + + +#include "Python.h" + +PyFunctionObject * +_PyFunction_FromConstructor(PyFrameConstructor *constr); + + +#endif /* !Py_INTERNAL_FUNCTION_H */ |