Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Revert "Delete LOAD_CONST_IMMORTAL (it exists in 3.14 but not 15)"
This reverts commit 7a1cc7f.
  • Loading branch information
AA-Turner committed Sep 29, 2025
commit 0da40d9c2827592397b5536e0cee8e9441f46275
5 changes: 5 additions & 0 deletions Doc/library/dis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1964,6 +1964,11 @@ but are replaced by real opcodes or removed before bytecode is generated.
``SETUP_CLEANUP`` or ``SETUP_WITH``.


.. opcode:: LOAD_CONST_IMMORTAL (consti)

Works as :opcode:`LOAD_CONST`, but is more efficient for immortal objects.


.. opcode:: JUMP
JUMP_NO_INTERRUPT

Expand Down
2 changes: 1 addition & 1 deletion Doc/whatsnew/3.14.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2864,7 +2864,7 @@ Pseudo-instructions
* Add the :opcode:`!LOAD_CONST_MORTAL` pseudo instruction.
(Contributed by Mark Shannon in :gh:`128685`.)

* Add the :opcode:`!LOAD_CONST_IMMORTAL` pseudo instruction,
* Add the :opcode:`LOAD_CONST_IMMORTAL` pseudo instruction,
which does the same as :opcode:`!LOAD_CONST`, but is more efficient
for immortal objects.
(Contributed by Mark Shannon in :gh:`125837`.)
Expand Down
2 changes: 1 addition & 1 deletion Misc/NEWS.d/3.14.0a2.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1400,7 +1400,7 @@ The :class:`memoryview` type now supports subscription, making it a
.. nonce: KlCdgD
.. section: Core and Builtins

Adds :opcode:`LOAD_SMALL_INT` and :opcode:`!LOAD_CONST_IMMORTAL`
Adds :opcode:`LOAD_SMALL_INT` and :opcode:`LOAD_CONST_IMMORTAL`
instructions. ``LOAD_SMALL_INT`` pushes a small integer equal to the
``oparg`` to the stack. ``LOAD_CONST_IMMORTAL`` does the same as
``LOAD_CONST`` but is more efficient for immortal objects. Removes
Expand Down
Loading