summaryrefslogtreecommitdiffstats
path: root/Lib/opcode.py
diff options
context:
space:
mode:
authorhms <18321626+polynomialherder@users.noreply.github.com>2023-06-29 16:34:00 (GMT)
committerGitHub <noreply@github.com>2023-06-29 16:34:00 (GMT)
commit8bff940ad69ce176dcd2b8e91d0b30ddd09945f1 (patch)
tree1ecf331f5376e764b28a82fdddb33f99a3dee6df /Lib/opcode.py
parent3c70d467c148875f2ce17bacab8909ecc3e9fc1d (diff)
downloadcpython-8bff940ad69ce176dcd2b8e91d0b30ddd09945f1.zip
cpython-8bff940ad69ce176dcd2b8e91d0b30ddd09945f1.tar.gz
cpython-8bff940ad69ce176dcd2b8e91d0b30ddd09945f1.tar.bz2
gh-105775: Convert LOAD_CLOSURE to a pseudo-op (#106059)
This enables super-instruction formation, removal of checks for uninitialized variables, and frees up an instruction.
Diffstat (limited to 'Lib/opcode.py')
-rw-r--r--Lib/opcode.py3
1 files changed, 1 insertions, 2 deletions
diff --git a/Lib/opcode.py b/Lib/opcode.py
index 392464d..52c566c 100644
--- a/Lib/opcode.py
+++ b/Lib/opcode.py
@@ -198,8 +198,6 @@ def_op('BUILD_SLICE', 133) # Number of items
jrel_op('JUMP_BACKWARD_NO_INTERRUPT', 134) # Number of words to skip (backwards)
def_op('MAKE_CELL', 135)
hasfree.append(135)
-def_op('LOAD_CLOSURE', 136)
-hasfree.append(136)
def_op('LOAD_DEREF', 137)
hasfree.append(137)
def_op('STORE_DEREF', 138)
@@ -293,6 +291,7 @@ pseudo_op('LOAD_ZERO_SUPER_METHOD', 264, ['LOAD_SUPER_ATTR'])
pseudo_op('LOAD_ZERO_SUPER_ATTR', 265, ['LOAD_SUPER_ATTR'])
pseudo_op('STORE_FAST_MAYBE_NULL', 266, ['STORE_FAST'])
+pseudo_op('LOAD_CLOSURE', 267, ['LOAD_FAST'])
MAX_PSEUDO_OPCODE = MIN_PSEUDO_OPCODE + len(_pseudo_ops) - 1