summaryrefslogtreecommitdiff
path: root/Lib/opcode.py
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2021-11-23 09:53:24 +0000
committerGitHub <noreply@github.com>2021-11-23 09:53:24 +0000
commit135cabd328504e1648d17242b42b675cdbd0193b (patch)
tree4efa5418b1816ba02c206678ecfa4e2d8e8d8f14 /Lib/opcode.py
parentd82f2caf942fa8b94e797a2f116ee54ec303c2df (diff)
downloadcpython-git-135cabd328504e1648d17242b42b675cdbd0193b.tar.gz
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 'Lib/opcode.py')
-rw-r--r--Lib/opcode.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/Lib/opcode.py b/Lib/opcode.py
index 3603bb422b..60805e92ff 100644
--- a/Lib/opcode.py
+++ b/Lib/opcode.py
@@ -177,6 +177,7 @@ def_op('SET_ADD', 146)
def_op('MAP_ADD', 147)
def_op('LOAD_CLASSDEREF', 148)
hasfree.append(148)
+def_op('COPY_FREE_VARS', 149)
def_op('MATCH_CLASS', 152)