10000 gh-87729: add LOAD_SUPER_ATTR instruction for faster super() by carljm · Pull Request #103497 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

gh-87729: add LOAD_SUPER_ATTR instruction for faster super() #103497

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

Merged
merged 23 commits into from
Apr 24, 2023
Merged
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
Next Next commit
document LOAD_ZERO_SUPER_ATTR
  • Loading branch information
carljm committed Apr 13, 2023
commit 5625e73e323ff9eba822e9b70521a5c02399e230
12 changes: 12 additions & 0 deletions Doc/library/dis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -1036,6 +1036,18 @@ iterations of the loop.
pushed to the stack before the attribute or unbound method respectively.


.. opcode:: LOAD_ZERO_SUPER_ATTR (namei)

This opcode implements zero-argument :func:`super` (i.e. ``super().method()``
and ``super().attr``). It works the same as :opcode:`LOAD_ATTR`, except that
instead of expecting a single receiver on the stack, it expects three objects
(from top of stack down): ``self`` (the first argument to the current
method), ``cls`` (the class within which the current method was defined), and
the global ``super``.

.. versionadded:: 3.12


.. opcode:: COMPARE_OP (opname)

Performs a Boolean operation. The operation name can be found in
Expand Down
0