Skip to content

gh-135447: Update dis.rst to reflect 3.14 bytecode instructions #135478

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 5 commits into from
Closed
Changes from all commits
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
39 changes: 29 additions & 10 deletions Doc/library/dis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -646,6 +646,26 @@ operations on it as if it was a Python list. The top of the stack corresponds to

.. versionadded:: 3.11

.. opcode:: BUILD_INTERPOLATION

Push a new interpolated string constructed from format components on the stack.

.. versionadded:: 3.14


.. opcode:: LOAD_SMALL_INT (i)

Push a small integer literal (−128 <= i <= 127) directly onto the stack.

.. versionadded:: 3.14


.. opcode:: NOT_TAKEN

No-op; a hint to the interpreter that a branch was predicted as not taken.

.. versionadded:: 3.14


**Unary operations**

Expand Down Expand Up @@ -1086,14 +1106,6 @@ iterations of the loop.
Pushes ``co_consts[consti]`` onto the stack.


.. opcode:: LOAD_SMALL_INT (i)

Pushes the integer ``i`` onto the stack.
``i`` must be in ``range(256)``

.. versionadded:: 3.14


Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why this have been removed from Unary operations section?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I removed it because it was causing conflict in a check as it was mentioned twice. If its better then i can re add this here and remove the other mention

.. opcode:: LOAD_CONST_IMMORTAL (consti)

Pushes ``co_consts[consti]`` onto the stack.
Expand Down Expand Up @@ -1576,16 +1588,23 @@ iterations of the loop.
.. opcode:: CALL_FUNCTION_EX (flags)

Calls a callable object with variable set of positional and keyword
arguments. If the lowest bit of *flags* is set, the top of the stack
arguments. If the lowest bit of *flags* is set, the top of the stack
contains a mapping object containing additional keyword arguments.
Before the callable is called, the mapping object and iterable object
are each "unpacked" and their contents passed in as keyword and
positional arguments respectively.

If the second bit of *flags* is set (new in 3.14), the call is made
in a specialized way to handle certain internal optimizations.

``CALL_FUNCTION_EX`` pops all arguments and the callable object off the stack,
calls the callable object with those arguments, and pushes the return value
calls the callable with those arguments, and pushes the return value
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it better without "object" word?

returned by the callable object.

.. versionadded:: 3.6
.. versionchanged:: 3.14
The second bit of *flags* may now be set to enable specialized calls.



.. opcode:: PUSH_NULL
Expand Down
Loading