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
Add news and remove PRECALL from docs.
  • Loading branch information
markshannon committed May 18, 2022
commit bad98cf66dbd467da21e2bf52afb7c9cb265ea00
17 changes: 3 additions & 14 deletions Doc/library/dis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -45,9 +45,8 @@ the following command can be used to display the disassembly of
2 2 PUSH_NULL
4 LOAD_GLOBAL 1 (NULL + len)
6 LOAD_FAST 0 (alist)
8 PRECALL 1
10 CALL 1
12 RETURN_VALUE
8 CALL 1
18 RETURN_VALUE

(The "2" is a line number).

Expand Down Expand Up @@ -119,7 +118,6 @@ Example::
PUSH_NULL
LOAD_GLOBAL
LOAD_FAST
PRECALL
CALL
RETURN_VALUE

Expand Down Expand Up @@ -1182,15 +1180,6 @@ iterations of the loop.
.. versionadded:: 3.7


.. opcode:: PRECALL (argc)

Prefixes :opcode:`CALL`. Logically this is a no op.
It exists to enable effective specialization of calls.
``argc`` is the number of arguments as described in :opcode:`CALL`.

.. versionadded:: 3.11


.. opcode:: PUSH_NULL

Pushes a ``NULL`` to the stack.
Expand All @@ -1202,7 +1191,7 @@ iterations of the loop.

.. opcode:: KW_NAMES (i)

Prefixes :opcode:`PRECALL`.
Prefixes :opcode:`CALL`.
Stores a reference to ``co_consts[consti]`` into an internal variable
for use by :opcode:`CALL`. ``co_consts[consti]`` must be a tuple of strings.

Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
The PRECALL instruction has been removed. It offered only a small advantage
for specialization and is not needed in the vast majority of cases.