summaryrefslogtreecommitdiffstats
path: root/Python/compile.c
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 /Python/compile.c
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 'Python/compile.c')
-rw-r--r--Python/compile.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/Python/compile.c b/Python/compile.c
index d080144..5936184 100644
--- a/Python/compile.c
+++ b/Python/compile.c
@@ -836,6 +836,8 @@ stack_effect(int opcode, int oparg, int jump)
case STORE_FAST_MAYBE_NULL:
return -1;
+ case LOAD_CLOSURE:
+ return 1;
case LOAD_METHOD:
return 1;
case LOAD_SUPER_METHOD: