Skip to content

Commit 1aed281

Browse files
committed
Add docs for new opcodes
1 parent fdeae7d commit 1aed281

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

Doc/library/dis.rst

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1402,13 +1402,29 @@ iterations of the loop.
14021402
This opcode is now only used in situations where the local variable is
14031403
guaranteed to be initialized. It cannot raise :exc:`UnboundLocalError`.
14041404

1405+
.. opcode:: LOAD_FAST_BORROW (var_num)
1406+
1407+
Pushes a borrowed reference to the local ``co_varnames[var_num]`` onto the stack
1408+
in free-threaded builds. In default builds this is identical to ``LOAD_FAST``.
1409+
1410+
.. versionadded:: 3.14
1411+
14051412
.. opcode:: LOAD_FAST_LOAD_FAST (var_nums)
14061413

14071414
Pushes references to ``co_varnames[var_nums >> 4]`` and
14081415
``co_varnames[var_nums & 15]`` onto the stack.
14091416

14101417
.. versionadded:: 3.13
14111418

1419+
1420+
.. opcode:: LOAD_FAST_BORROW_LOAD_FAST_BORROW (var_nums)
1421+
1422+
Pushes borrowed references to ``co_varnames[var_nums >> 4]`` and
1423+
``co_varnames[var_nums & 15]`` onto the stack in free-threaded builds. This is
1424+
identical to ``LOAD_FAST_LOAD_FAST`` in default builds.
1425+
1426+
.. versionadded:: 3.14
1427+
14121428
.. opcode:: LOAD_FAST_CHECK (var_num)
14131429

14141430
Pushes a reference to the local ``co_varnames[var_num]`` onto the stack,
@@ -2023,4 +2039,3 @@ instructions:
20232039

20242040
.. deprecated:: 3.13
20252041
All jumps are now relative. This list is empty.
2026-

0 commit comments

Comments
 (0)