-
-
Notifications
You must be signed in to change notification settings - Fork 32.2k
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
Closed
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
e7952dd
Add 3.14 instructions and update CALL_FUNCTION_EX in dis docs
Ragna1204 d748292
Merge branch 'main' into fix-6876
Ragna1204 0538503
Remove duplicated LOAD_SMALL_INT (i) opcode from dis.rst
Ragna1204 6966c56
Remove duplicated LOAD_SMALL_INT (i) opcode from dis.rst
Ragna1204 9956ae3
Merge branch 'main' into fix-6876
Ragna1204 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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 |
---|---|---|
|
@@ -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** | ||
|
||
|
@@ -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 | ||
|
||
|
||
.. opcode:: LOAD_CONST_IMMORTAL (consti) | ||
|
||
Pushes ``co_consts[consti]`` onto the stack. | ||
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe 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 | ||
|
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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