Skip to content

Commit 09ba3bc

Browse files
committed
update docs and news
1 parent 4e29993 commit 09ba3bc

File tree

3 files changed

+50
-15
lines changed

3 files changed

+50
-15
lines changed

Doc/library/dis.rst

Lines changed: 38 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -937,30 +937,58 @@ iterations of the loop.
937937
.. versionadded:: 3.11
938938

939939

940-
.. opcode:: POP_JUMP_IF_TRUE (target)
940+
.. opcode:: POP_JUMP_FORWARD_IF_TRUE (delta)
941941

942-
If TOS is true, sets the bytecode counter to *target*. TOS is popped.
942+
If TOS is true, increments the bytecode counter by *delta*. TOS is popped.
943943

944-
.. versionadded:: 3.1
944+
.. versionadded:: 3.11
945945

946946

947-
.. opcode:: POP_JUMP_IF_FALSE (target)
947+
.. opcode:: POP_JUMP_BACKWARD_IF_TRUE (delta)
948948

949-
If TOS is false, sets the bytecode counter to *target*. TOS is popped.
949+
If TOS is true, decrements the bytecode counter by *delta*. TOS is popped.
950950

951-
.. versionadded:: 3.1
951+
.. versionadded:: 3.11
952+
953+
954+
.. opcode:: POP_JUMP_FORWARD_IF_FALSE (delta)
955+
956+
If TOS is false, increments the bytecode counter by *delta*. TOS is popped.
957+
958+
.. versionadded:: 3.11
959+
960+
961+
.. opcode:: POP_JUMP_BACKWARD_IF_FALSE (delta)
962+
963+
If TOS is false, decrements the bytecode counter by *delta*. TOS is popped.
964+
965+
.. versionadded:: 3.11
966+
967+
968+
.. opcode:: POP_JUMP_FORWARD_IF_NOT_NONE (delta)
969+
970+
If TOS is not ``None``, increments the bytecode counter by *delta*. TOS is popped.
971+
972+
.. versionadded:: 3.11
973+
974+
975+
.. opcode:: POP_JUMP_BACKWARD_IF_NOT_NONE (delta)
976+
977+
If TOS is not ``None``, decrements the bytecode counter by *delta*. TOS is popped.
978+
979+
.. versionadded:: 3.11
952980

953981

954-
.. opcode:: POP_JUMP_IF_NOT_NONE (target)
982+
.. opcode:: POP_JUMP_FORWARD_IF_NONE (delta)
955983

956-
If TOS is not none, sets the bytecode counter to *target*. TOS is popped.
984+
If TOS is ``None``, increments the bytecode counter by *delta*. TOS is popped.
957985

958986
.. versionadded:: 3.11
959987

960988

961-
.. opcode:: POP_JUMP_IF_NONE (target)
989+
.. opcode:: POP_JUMP_BACKWARD_IF_NONE (delta)
962990

963-
If TOS is none, sets the bytecode counter to *target*. TOS is popped.
991+
If TOS is ``None``, decrements the bytecode counter by *delta*. TOS is popped.
964992

965993
.. versionadded:: 3.11
966994

Doc/whatsnew/3.11.rst

Lines changed: 11 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -743,9 +743,6 @@ CPython bytecode changes
743743
``ROT_TWO``, ``ROT_THREE``, ``ROT_FOUR``, and ``ROT_N``) with new
744744
:opcode:`COPY` and :opcode:`SWAP` instructions.
745745

746-
* Add :opcode:`POP_JUMP_IF_NOT_NONE` and :opcode:`POP_JUMP_IF_NONE` opcodes to
747-
speed up conditional jumps.
748-
749746
* Replaced :opcode:`JUMP_IF_NOT_EXC_MATCH` by :opcode:`CHECK_EXC_MATCH` which
750747
performs the check but does not jump.
751748

@@ -754,7 +751,17 @@ CPython bytecode changes
754751

755752
* Replaced :opcode:`JUMP_ABSOLUTE` by the relative :opcode:`JUMP_BACKWARD`.
756753

757-
* Added :opcode:`JUMP_BACKWARD_NO_INTERRUPT`, which is used in certain loops where it is undesirable to handle interrupts.
754+
* Added :opcode:`JUMP_BACKWARD_NO_INTERRUPT`, which is used in certain loops where it
755+
is undesirable to handle interrupts.
756+
757+
* Replaced :opcode:`POP_JUMP_IF_TRUE` and :opcode:`POP_JUMP_IF_FALSE` by
758+
the relative :opcode:`POP_JUMP_FORWARD_IF_TRUE`, :opcode:`POP_JUMP_BACKWARD_IF_TRUE`,
759+
:opcode:`POP_JUMP_FORWARD_IF_FALSE` and :opcode:`POP_JUMP_BACKWARD_IF_FALSE`.
760+
761+
* Added :opcode:`POP_JUMP_FORWARD_IF_NOT_NONE`, :opcode:`POP_JUMP_BACKWARD_IF_NOT_NONE`,
762+
:opcode:`POP_JUMP_FORWARD_IF_NONE` and :opcode:`POP_JUMP_BACKWARD_IF_NONE`
763+
opcodes to speed up conditional jumps.
764+
758765

759766
Deprecated
760767
==========
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
Make :opcode:`POP_JUMP_IF_NONE` and :opcode:`POP_JUMP_IF_NOT_NONE` virtual, mapping to new relative jump opcodes.
1+
Make :opcode:`POP_JUMP_IF_TRUE`, :opcode:`POP_JUMP_IF_FALSE`, :opcode:`POP_JUMP_IF_NONE` and :opcode:`POP_JUMP_IF_NOT_NONE` virtual, mapping to new relative jump opcodes.

0 commit comments

Comments
 (0)