8000 GH-132532: Make CHECK_PERIODIC an instruction, not just a uop. by markshannon · Pull Request #135772 · python/cpython · GitHub
[go: up one dir, main page]

Skip to content

GH-132532: Make CHECK_PERIODIC an instruction, not just a uop. #135772

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

Open
wants to merge 10 commits into
base: main
Choose a base branch
from
Prev Previous commit
Next Next commit
Update dis.rst
  • Loading branch information
markshannon committed Jun 20, 2025
commit 6d61ef4659052c49469ee7774bb4e760cbd1b9fc
11 changes: 11 additions & 0 deletions Doc/library/dis.rst
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,7 @@ the following command can be used to display the disassembly of
3 LOAD_GLOBAL 1 (len + NULL)
LOAD_FAST_BORROW 0 (alist)
CALL 1
CHECK_PERIODIC
RETURN_VALUE

(The "2" is a line number).
Expand Down Expand Up @@ -217,6 +218,7 @@ Example:
LOAD_GLOBAL
LOAD_FAST_BORROW
CALL
CHECK_PERIODIC
RETURN_VALUE


Expand Down Expand Up @@ -1751,6 +1753,15 @@ iterations of the loop.
.. versionadded:: 3.11


.. opcode:: CHECK_PERIODIC

Checks the eval breaker and performs periodic tasks if the eval breaker is set.
Tasks inlcude switching threads and performing GC amongst others.
All :opcode:`CALL` instructions must be followed by opcode:`CHECK_PERIODIC`.

.. versionadded:: 3.14


.. opcode:: HAVE_ARGUMENT

This is not really an opcode. It identifies the dividing line between
Expand Down
Loading
0