summaryrefslogtreecommitdiffstats
path: root/Doc/library/dis.rst
diff options
context:
space:
mode:
Diffstat (limited to 'Doc/library/dis.rst')
-rw-r--r--Doc/library/dis.rst39
1 files changed, 16 insertions, 23 deletions
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst
index 30bbf95..33ef6d7 100644
--- a/Doc/library/dis.rst
+++ b/Doc/library/dis.rst
@@ -607,15 +607,6 @@ the original TOS1.
.. versionadded:: 3.12
-.. opcode:: STOPITERATION_ERROR
-
- Handles a StopIteration raised in a generator or coroutine.
- If TOS is an instance of :exc:`StopIteration`, or :exc:`StopAsyncIteration`
- replace it with a :exc:`RuntimeError`.
-
- .. versionadded:: 3.12
-
-
.. opcode:: BEFORE_ASYNC_WITH
Resolves ``__aenter__`` and ``__aexit__`` from the object on top of the
@@ -627,13 +618,6 @@ the original TOS1.
**Miscellaneous opcodes**
-.. opcode:: PRINT_EXPR
-
- Implements the expression statement for the interactive mode. TOS is removed
- from the stack and printed. In non-interactive mode, an expression statement
- is terminated with :opcode:`POP_TOP`.
-
-
.. opcode:: SET_ADD (i)
Calls ``set.add(TOS1[-i], TOS)``. Used to implement set comprehensions.
@@ -682,13 +666,6 @@ iterations of the loop.
.. versionadded:: 3.6
-.. opcode:: IMPORT_STAR
-
- Loads all symbols not starting with ``'_'`` directly from the module TOS to
- the local namespace. The module is popped after loading all names. This
- opcode implements ``from module import *``.
-
-
.. opcode:: POP_EXCEPT
Pops a value from the stack, which is used to restore the exception state.
@@ -1422,6 +1399,22 @@ iterations of the loop.
they use their arg.
+.. opcode:: CALL_INTRINSIC_1
+
+ Calls an intrinsic function with one argument. Passes the TOS as the argument
+ and sets TOS to the result. Used to implement functionality that is necessary
+ but not performance critical.
+
+ The operand determines which intrinsic function is called:
+
+ * ``0`` Not valid
+ * ``1`` Prints the argument to standard out. Used in the REPL.
+ * ``2`` Performs ``import *`` for the named module.
+ * ``3`` Extracts the return value from a ``StopIteration`` exception.
+
+ .. versionadded:: 3.12
+
+
**Pseudo-instructions**
These opcodes do not appear in python bytecode, they are used by the compiler