@@ -460,10 +460,6 @@ The Python compiler currently generates the following bytecode instructions.
460460Unary operations take the top of the stack, apply the operation, and push the
461461result back on the stack.
462462
463- .. opcode :: UNARY_POSITIVE
464-
465- Implements ``TOS = +TOS ``.
466-
467463
468464.. opcode :: UNARY_NEGATIVE
469465
@@ -607,15 +603,6 @@ the original TOS1.
607603 .. versionadded :: 3.12
608604
609605
610- .. opcode :: STOPITERATION_ERROR
611-
612- Handles a StopIteration raised in a generator or coroutine.
613- If TOS is an instance of :exc: `StopIteration `, or :exc: `StopAsyncIteration `
614- replace it with a :exc: `RuntimeError `.
615-
616- .. versionadded :: 3.12
617-
618-
619606.. opcode :: BEFORE_ASYNC_WITH
620607
621608 Resolves ``__aenter__ `` and ``__aexit__ `` from the object on top of the
@@ -627,13 +614,6 @@ the original TOS1.
627614
628615**Miscellaneous opcodes **
629616
630- .. opcode :: PRINT_EXPR
631-
632- Implements the expression statement for the interactive mode. TOS is removed
633- from the stack and printed. In non-interactive mode, an expression statement
634- is terminated with :opcode: `POP_TOP `.
635-
636-
637617.. opcode :: SET_ADD (i)
638618
639619 Calls ``set.add(TOS1[-i], TOS) ``. Used to implement set comprehensions.
@@ -682,13 +662,6 @@ iterations of the loop.
682662 .. versionadded :: 3.6
683663
684664
685- .. opcode :: IMPORT_STAR
686-
687- Loads all symbols not starting with ``'_' `` directly from the module TOS to
688- the local namespace. The module is popped after loading all names. This
689- opcode implements ``from module import * ``.
690-
691-
692665.. opcode :: POP_EXCEPT
693666
694667 Pops a value from the stack, which is used to restore the exception state.
@@ -929,13 +902,6 @@ iterations of the loop.
929902 .. versionadded :: 3.6
930903
931904
932- .. opcode :: LIST_TO_TUPLE
933-
934- Pops a list from the stack and pushes a tuple containing the same values.
935-
936- .. versionadded :: 3.9
937-
938-
939905.. opcode :: LIST_EXTEND (i)
940906
941907 Calls ``list.extend(TOS1[-i], TOS) ``. Used to build lists.
@@ -1395,14 +1361,6 @@ iterations of the loop.
13951361 .. versionadded :: 3.11
13961362
13971363
1398- .. opcode :: ASYNC_GEN_WRAP
1399-
1400- Wraps the value on top of the stack in an ``async_generator_wrapped_value ``.
1401- Used to yield in async generators.
1402-
1403- .. versionadded :: 3.11
1404-
1405-
14061364.. opcode :: HAVE_ARGUMENT
14071365
14081366 This is not really an opcode. It identifies the dividing line between
@@ -1422,6 +1380,25 @@ iterations of the loop.
14221380 they use their arg.
14231381
14241382
1383+ .. opcode :: CALL_INTRINSIC_1
1384+
1385+ Calls an intrinsic function with one argument. Passes the TOS as the argument
1386+ and sets TOS to the result. Used to implement functionality that is necessary
1387+ but not performance critical.
1388+
1389+ The operand determines which intrinsic function is called:
1390+
1391+ * ``0 `` Not valid
1392+ * ``1 `` Prints the argument to standard out. Used in the REPL.
1393+ * ``2 `` Performs ``import * `` for the named module.
1394+ * ``3 `` Extracts the return value from a ``StopIteration `` exception.
1395+ * ``4 `` Wraps an aync generator value
1396+ * ``5 `` Performs the unary ``+ `` operation
1397+ * ``6 `` Converts a list to a tuple
1398+
1399+ .. versionadded :: 3.12
1400+
1401+
14251402**Pseudo-instructions **
14261403
14271404These opcodes do not appear in python bytecode, they are used by the compiler
0 commit comments