FazBrowse GitHub Viewer | Trending |
URL:
| Home
Tools: [Download Repo ZIP]   [Original HTTPS Page]

GH-105848: Get rid of `KW_NAMES` (again) by brandtbucher · Pull Request #108496 · python/cpython · GitHub

/ cpython Public
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .c  (6) .h  (8) .py  (8) .rst  (2) All 4 file types selected
Viewed files
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Unified
Split
Hide whitespace
Diff view
Unified
Split
Hide whitespace
34 changes: 12 additions & 22 deletions Doc/library/dis.rst
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters. Learn more about bidirectional Unicode characters
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,9 @@ the following command can be used to display the disassembly of
<BLANKLINE>
3 2 LOAD_GLOBAL 1 (len + NULL)
12 LOAD_FAST 0 (alist)
14 CALL 1
22 RETURN_VALUE
14 PUSH_NULL
16 CALL 1
24 RETURN_VALUE

(The "2" is a line number).

Expand Down Expand Up @@ -138,6 +139,7 @@ Example:
RESUME
LOAD_GLOBAL
LOAD_FAST
PUSH_NULL
CALL
RETURN_VALUE

Expand Down Expand Up @@ -1391,21 +1393,14 @@ iterations of the loop.
.. opcode:: CALL (argc)

Calls a callable object with the number of arguments specified by ``argc``,
including the named arguments specified by the preceding
:opcode:`KW_NAMES`, if any.
On the stack are (in ascending order), either:
including the named arguments, if any.
On the stack are (in ascending order):

* NULL
* The callable
* The positional arguments
* The named arguments

or:

* The callable
* ``self``
* ``self`` (or ``NULL``)
* The remaining positional arguments
* The named arguments
* A tuple of keyword names (or ``NULL``)

``argc`` is the total of the positional and named arguments, excluding
``self`` when a ``NULL`` is not present.
Expand All @@ -1416,6 +1411,10 @@ iterations of the loop.

.. versionadded:: 3.11

.. versionchanged:: 3.13
Keyword names are now pushed to the stack instead of being indicated by
a preceding ``KW_NAMES`` instruction.


.. opcode:: CALL_FUNCTION_EX (flags)

Expand All @@ -1441,15 +1440,6 @@ iterations of the loop.
.. versionadded:: 3.11


.. opcode:: KW_NAMES (consti)

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.

.. versionadded:: 3.11


.. opcode:: MAKE_FUNCTION

Pushes a new function object on the stack built from the code object at ``STACK[1]``.
Expand Down
67 changes: 32 additions & 35 deletions Include/internal/pycore_opcode_metadata.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

121 changes: 60 additions & 61 deletions Include/opcode_ids.h

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

Loading

Back | FazBrowse Home | New Git URL