diff options
author | hms <18321626+polynomialherder@users.noreply.github.com> | 2023-06-29 16:34:00 (GMT) |
---|---|---|
committer | GitHub <noreply@github.com> | 2023-06-29 16:34:00 (GMT) |
commit | 8bff940ad69ce176dcd2b8e91d0b30ddd09945f1 (patch) | |
tree | 1ecf331f5376e764b28a82fdddb33f99a3dee6df /Python/bytecodes.c | |
parent | 3c70d467c148875f2ce17bacab8909ecc3e9fc1d (diff) | |
download | cpython-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/bytecodes.c')
-rw-r--r-- | Python/bytecodes.c | 9 |
1 files changed, 3 insertions, 6 deletions
diff --git a/Python/bytecodes.c b/Python/bytecodes.c index 0285710..1d9664b 100644 --- a/Python/bytecodes.c +++ b/Python/bytecodes.c @@ -175,12 +175,9 @@ dummy_func( } } - inst(LOAD_CLOSURE, (-- value)) { - /* We keep LOAD_CLOSURE so that the bytecode stays more readable. */ - value = GETLOCAL(oparg); - ERROR_IF(value == NULL, unbound_local_error); - Py_INCREF(value); - } + pseudo(LOAD_CLOSURE) = { + LOAD_FAST, + }; inst(LOAD_FAST_CHECK, (-- value)) { value = GETLOCAL(oparg); |