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 /Doc/library | |
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 'Doc/library')
-rw-r--r-- | Doc/library/dis.rst | 23 |
1 files changed, 11 insertions, 12 deletions
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst index 39d4357..63336bb 100644 --- a/Doc/library/dis.rst +++ b/Doc/library/dis.rst @@ -1291,18 +1291,6 @@ iterations of the loop. .. versionadded:: 3.11 -.. opcode:: LOAD_CLOSURE (i) - - Pushes a reference to the cell contained in slot ``i`` of the "fast locals" - storage. The name of the variable is ``co_fastlocalnames[i]``. - - Note that ``LOAD_CLOSURE`` is effectively an alias for ``LOAD_FAST``. - It exists to keep bytecode a little more readable. - - .. versionchanged:: 3.11 - ``i`` is no longer offset by the length of ``co_varnames``. - - .. opcode:: LOAD_DEREF (i) Loads the cell contained in slot ``i`` of the "fast locals" storage. @@ -1725,6 +1713,17 @@ but are replaced by real opcodes or removed before bytecode is generated. Undirected relative jump instructions which are replaced by their directed (forward/backward) counterparts by the assembler. +.. opcode:: LOAD_CLOSURE (i) + + Pushes a reference to the cell contained in slot ``i`` of the "fast locals" + storage. + + Note that ``LOAD_CLOSURE`` is replaced with ``LOAD_FAST`` in the assembler. + + .. versionchanged:: 3.13 + This opcode is now a pseudo-instruction. + + .. opcode:: LOAD_METHOD Optimized unbound method lookup. Emitted as a ``LOAD_ATTR`` opcode |