summaryrefslogtreecommitdiffstats
path: root/Doc/library/dis.rst
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2022-03-17 16:14:57 (GMT)
committerGitHub <noreply@github.com>2022-03-17 16:14:57 (GMT)
commit3011a097bd9500c007bd8b8d005edeea895f6b44 (patch)
treed2637ab682e1265eaf23316add1039b3829abb19 /Doc/library/dis.rst
parentef1327e3b622e0cafdf8bfc1f480fed0dd386be6 (diff)
downloadcpython-3011a097bd9500c007bd8b8d005edeea895f6b44.zip
cpython-3011a097bd9500c007bd8b8d005edeea895f6b44.tar.gz
cpython-3011a097bd9500c007bd8b8d005edeea895f6b44.tar.bz2
Use low bit of LOAD_GLOBAL's oparg to indicate whether it should push an additional NULL. (GH-31933)
Diffstat (limited to 'Doc/library/dis.rst')
-rw-r--r--Doc/library/dis.rst7
1 files changed, 5 insertions, 2 deletions
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst
index 65e888d..877e11b 100644
--- a/Doc/library/dis.rst
+++ b/Doc/library/dis.rst
@@ -43,7 +43,7 @@ the following command can be used to display the disassembly of
1 0 RESUME 0
2 2 PUSH_NULL
- 4 LOAD_GLOBAL 0 (len)
+ 4 LOAD_GLOBAL 1 (NULL + len)
6 LOAD_FAST 0 (alist)
8 PRECALL 1
10 CALL 1
@@ -996,8 +996,11 @@ iterations of the loop.
.. opcode:: LOAD_GLOBAL (namei)
- Loads the global named ``co_names[namei]`` onto the stack.
+ Loads the global named ``co_names[namei>>1]`` onto the stack.
+ .. versionchanged:: 3.11
+ If the low bit of ``namei`` is set, then a ``NULL`` is pushed to the
+ stack before the global variable.
.. opcode:: LOAD_FAST (var_num)