diff options
Diffstat (limited to 'Doc')
-rw-r--r-- | Doc/library/dis.rst | 48 | ||||
-rw-r--r-- | Doc/whatsnew/3.11.rst | 15 |
2 files changed, 49 insertions, 14 deletions
diff --git a/Doc/library/dis.rst b/Doc/library/dis.rst index fa0e23a..657778c 100644 --- a/Doc/library/dis.rst +++ b/Doc/library/dis.rst @@ -937,30 +937,58 @@ iterations of the loop. .. versionadded:: 3.11 -.. opcode:: POP_JUMP_IF_TRUE (target) +.. opcode:: POP_JUMP_FORWARD_IF_TRUE (delta) - If TOS is true, sets the bytecode counter to *target*. TOS is popped. + If TOS is true, increments the bytecode counter by *delta*. TOS is popped. - .. versionadded:: 3.1 + .. versionadded:: 3.11 -.. opcode:: POP_JUMP_IF_FALSE (target) +.. opcode:: POP_JUMP_BACKWARD_IF_TRUE (delta) - If TOS is false, sets the bytecode counter to *target*. TOS is popped. + If TOS is true, decrements the bytecode counter by *delta*. TOS is popped. - .. versionadded:: 3.1 + .. versionadded:: 3.11 + + +.. opcode:: POP_JUMP_FORWARD_IF_FALSE (delta) + + If TOS is false, increments the bytecode counter by *delta*. TOS is popped. + + .. versionadded:: 3.11 + + +.. opcode:: POP_JUMP_BACKWARD_IF_FALSE (delta) + + If TOS is false, decrements the bytecode counter by *delta*. TOS is popped. + + .. versionadded:: 3.11 + + +.. opcode:: POP_JUMP_FORWARD_IF_NOT_NONE (delta) + + If TOS is not ``None``, increments the bytecode counter by *delta*. TOS is popped. + + .. versionadded:: 3.11 + + +.. opcode:: POP_JUMP_BACKWARD_IF_NOT_NONE (delta) + + If TOS is not ``None``, decrements the bytecode counter by *delta*. TOS is popped. + + .. versionadded:: 3.11 -.. opcode:: POP_JUMP_IF_NOT_NONE (target) +.. opcode:: POP_JUMP_FORWARD_IF_NONE (delta) - If TOS is not none, sets the bytecode counter to *target*. TOS is popped. + If TOS is ``None``, increments the bytecode counter by *delta*. TOS is popped. .. versionadded:: 3.11 -.. opcode:: POP_JUMP_IF_NONE (target) +.. opcode:: POP_JUMP_BACKWARD_IF_NONE (delta) - If TOS is none, sets the bytecode counter to *target*. TOS is popped. + If TOS is ``None``, decrements the bytecode counter by *delta*. TOS is popped. .. versionadded:: 3.11 diff --git a/Doc/whatsnew/3.11.rst b/Doc/whatsnew/3.11.rst index 870330c..df0b0a7 100644 --- a/Doc/whatsnew/3.11.rst +++ b/Doc/whatsnew/3.11.rst @@ -750,9 +750,6 @@ CPython bytecode changes ``ROT_TWO``, ``ROT_THREE``, ``ROT_FOUR``, and ``ROT_N``) with new :opcode:`COPY` and :opcode:`SWAP` instructions. -* Add :opcode:`POP_JUMP_IF_NOT_NONE` and :opcode:`POP_JUMP_IF_NONE` opcodes to - speed up conditional jumps. - * Replaced :opcode:`JUMP_IF_NOT_EXC_MATCH` by :opcode:`CHECK_EXC_MATCH` which performs the check but does not jump. @@ -761,7 +758,17 @@ CPython bytecode changes * Replaced :opcode:`JUMP_ABSOLUTE` by the relative :opcode:`JUMP_BACKWARD`. -* Added :opcode:`JUMP_BACKWARD_NO_INTERRUPT`, which is used in certain loops where it is undesirable to handle interrupts. +* Added :opcode:`JUMP_BACKWARD_NO_INTERRUPT`, which is used in certain loops where it + is undesirable to handle interrupts. + +* Replaced :opcode:`POP_JUMP_IF_TRUE` and :opcode:`POP_JUMP_IF_FALSE` by + the relative :opcode:`POP_JUMP_FORWARD_IF_TRUE`, :opcode:`POP_JUMP_BACKWARD_IF_TRUE`, + :opcode:`POP_JUMP_FORWARD_IF_FALSE` and :opcode:`POP_JUMP_BACKWARD_IF_FALSE`. + +* Added :opcode:`POP_JUMP_FORWARD_IF_NOT_NONE`, :opcode:`POP_JUMP_BACKWARD_IF_NOT_NONE`, + :opcode:`POP_JUMP_FORWARD_IF_NONE` and :opcode:`POP_JUMP_BACKWARD_IF_NONE` + opcodes to speed up conditional jumps. + Deprecated ========== |