summaryrefslogtreecommitdiffstats
path: root/Doc
diff options
context:
space:
mode:
authorMark Shannon <mark@hotpy.org>2022-01-20 11:46:39 (GMT)
committerGitHub <noreply@github.com>2022-01-20 11:46:39 (GMT)
commitb04dfbbe4bd7071d46c8688c2263726ea31d33cd (patch)
tree17989daaffa384df343b53289845fba667e20acc /Doc
parentd05a66339b5e07d72d96e4c30a34cc3821bb61a2 (diff)
downloadcpython-b04dfbbe4bd7071d46c8688c2263726ea31d33cd.zip
cpython-b04dfbbe4bd7071d46c8688c2263726ea31d33cd.tar.gz
cpython-b04dfbbe4bd7071d46c8688c2263726ea31d33cd.tar.bz2
bpo-46409: Make generators in bytecode (GH-30633)
* Add RETURN_GENERATOR and JUMP_NO_INTERRUPT opcodes. * Trim frame and generator by word each. * Minor refactor of frame.c * Update test.test_sys to account for smaller frames. * Treat generator functions as normal functions when evaluating and specializing.
Diffstat (limited to 'Doc')
-rw-r--r--Doc/library/dis.rst15
1 files changed, 15 insertions, 0 deletions
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst
index 6bbe4ec..af28e5c 100644
--- a/Doc/library/dis.rst
+++ b/Doc/library/dis.rst
@@ -942,6 +942,13 @@ All of the following opcodes use their arguments.
Set bytecode counter to *target*.
+.. opcode:: JUMP_NO_INTERRUPT (target)
+
+ Set bytecode counter to *target*. Do not check for interrupts.
+
+ .. versionadded:: 3.11
+
+
.. opcode:: FOR_ITER (delta)
TOS is an :term:`iterator`. Call its :meth:`~iterator.__next__` method. If
@@ -1220,6 +1227,14 @@ All of the following opcodes use their arguments.
.. versionadded:: 3.11
+.. opcode:: RETURN_GENERATOR
+
+ Create a generator, coroutine, or async generator from the current frame.
+ Clear the current frame and return the newly created generator.
+
+ .. versionadded:: 3.11
+
+
.. opcode:: HAVE_ARGUMENT
This is not really an opcode. It identifies the dividing line between