summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorEric Snow <ericsnowcurrently@gmail.com>2021-06-07 18:22:26 (GMT)
committerGitHub <noreply@github.com>2021-06-07 18:22:26 (GMT)
commit2ab27c4af4ddf7528e1375e77c787c7fbb09b5e6 (patch)
treed3983e5282f575560cb7449fae4785447fdfff14 /Doc
parent001eb520b5757294dc455c900d94b7b153de6cdd (diff)
downloadcpython-2ab27c4af4ddf7528e1375e77c787c7fbb09b5e6.zip
cpython-2ab27c4af4ddf7528e1375e77c787c7fbb09b5e6.tar.gz
cpython-2ab27c4af4ddf7528e1375e77c787c7fbb09b5e6.tar.bz2
bpo-43693: Un-revert commits 2c1e258 and b2bf2bc. (gh-26577)
These were reverted in gh-26530 (commit 17c4edc) due to refleaks. * 2c1e258 - Compute deref offsets in compiler (gh-25152) * b2bf2bc - Add new internal code objects fields: co_fastlocalnames and co_fastlocalkinds. (gh-26388) This change fixes the refleaks. https://bugs.python.org/issue43693
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/dis.rst30
1 files changed, 23 insertions, 7 deletions
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst
index a4746bc..bc206f7 100644
--- a/Doc/library/dis.rst
+++ b/Doc/library/dis.rst
@@ -1058,17 +1058,24 @@ All of the following opcodes use their arguments.
.. opcode:: LOAD_CLOSURE (i)
- Pushes a reference to the cell contained in slot *i* of the cell and free
- variable storage. The name of the variable is ``co_cellvars[i]`` if *i* is
- less than the length of *co_cellvars*. Otherwise it is ``co_freevars[i -
- len(co_cellvars)]``.
+ 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 cell and free variable storage.
+ Loads the cell contained in slot ``i`` of the "fast locals" storage.
Pushes a reference to the object the cell contains on the stack.
+ .. versionchanged:: 3.11
+ ``i`` is no longer offset by the length of ``co_varnames``.
+
.. opcode:: LOAD_CLASSDEREF (i)
@@ -1078,20 +1085,29 @@ All of the following opcodes use their arguments.
.. versionadded:: 3.4
+ .. versionchanged:: 3.11
+ ``i`` is no longer offset by the length of ``co_varnames``.
+
.. opcode:: STORE_DEREF (i)
- Stores TOS into the cell contained in slot *i* of the cell and free variable
+ Stores TOS into the cell contained in slot ``i`` of the "fast locals"
storage.
+ .. versionchanged:: 3.11
+ ``i`` is no longer offset by the length of ``co_varnames``.
+
.. opcode:: DELETE_DEREF (i)
- Empties the cell contained in slot *i* of the cell and free variable storage.
+ Empties the cell contained in slot ``i`` of the "fast locals" storage.
Used by the :keyword:`del` statement.
.. versionadded:: 3.2
+ .. versionchanged:: 3.11
+ ``i`` is no longer offset by the length of ``co_varnames``.
+
.. opcode:: RAISE_VARARGS (argc)