Skip to content

Commit 0da40d9

Browse files
committed
Revert "Delete LOAD_CONST_IMMORTAL (it exists in 3.14 but not 15)"
This reverts commit 7a1cc7f.
1 parent cd017e0 commit 0da40d9

File tree

3 files changed

+7
-2
lines changed

3 files changed

+7
-2
lines changed

Doc/library/dis.rst

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1964,6 +1964,11 @@ but are replaced by real opcodes or removed before bytecode is generated.
19641964
``SETUP_CLEANUP`` or ``SETUP_WITH``.
19651965

19661966

1967+
.. opcode:: LOAD_CONST_IMMORTAL (consti)
1968+
1969+
Works as :opcode:`LOAD_CONST`, but is more efficient for immortal objects.
1970+
1971+
19671972
.. opcode:: JUMP
19681973
JUMP_NO_INTERRUPT
19691974

Doc/whatsnew/3.14.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2864,7 +2864,7 @@ Pseudo-instructions
28642864
* Add the :opcode:`!LOAD_CONST_MORTAL` pseudo instruction.
28652865
(Contributed by Mark Shannon in :gh:`128685`.)
28662866

2867-
* Add the :opcode:`!LOAD_CONST_IMMORTAL` pseudo instruction,
2867+
* Add the :opcode:`LOAD_CONST_IMMORTAL` pseudo instruction,
28682868
which does the same as :opcode:`!LOAD_CONST`, but is more efficient
28692869
for immortal objects.
28702870
(Contributed by Mark Shannon in :gh:`125837`.)

Misc/NEWS.d/3.14.0a2.rst

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1400,7 +1400,7 @@ The :class:`memoryview` type now supports subscription, making it a
14001400
.. nonce: KlCdgD
14011401
.. section: Core and Builtins
14021402
1403-
Adds :opcode:`LOAD_SMALL_INT` and :opcode:`!LOAD_CONST_IMMORTAL`
1403+
Adds :opcode:`LOAD_SMALL_INT` and :opcode:`LOAD_CONST_IMMORTAL`
14041404
instructions. ``LOAD_SMALL_INT`` pushes a small integer equal to the
14051405
``oparg`` to the stack. ``LOAD_CONST_IMMORTAL`` does the same as
14061406
``LOAD_CONST`` but is more efficient for immortal objects. Removes

0 commit comments

Comments
 (0)