Skip to content

Commit 050fc1e

Browse files
committed
Document LOAD_INT and add news
1 parent 81e4dd6 commit 050fc1e

File tree

2 files changed

+12
-0
lines changed

2 files changed

+12
-0
lines changed

Doc/library/dis.rst

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1079,6 +1079,14 @@ iterations of the loop.
10791079
Pushes ``co_consts[consti]`` onto the stack.
10801080

10811081

1082+
.. opcode:: LOAD_INT (i)
1083+
1084+
Pushes the integer ``i`` onto the stack.
1085+
``i`` must be in ``range(256)``
1086+
1087+
.. versionadded:: 3.14
1088+
1089+
10821090
.. opcode:: LOAD_CONST_IMMORTAL (consti)
10831091

10841092
Pushes ``co_consts[consti]`` onto the stack.
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
Adds :opcode:`LOAD_INT` and :opcode:`LOAD_CONST_IMMORTAL` instructions.
2+
``LOAD_INT`` pushes a small integer equal to the ``oparg`` to the stack.
3+
``LOAD_CONST_IMMORTAL`` does the same as ``LOAD_CONST`` but is more
4+
efficient for immortal objects.

0 commit comments

Comments
 (0)