Uh oh!
There was an error while loading.Please reload this page.
- Notifications
You must be signed in to change notification settings - Fork32k
Closed
Description
As part of adding support for Python 3.12 tohttps://github.com/MatthieuDartiailh/bytecode I have identified a number of documentation issues both in thedis
module documentation in the bytecode section of theWhat's new in 3.12
. Opening a separate issue for each point would just clutter the issue tracker so I will try to summarize all my findings here.
Issue indis
documentation
- COMPARE_OP oparg now uses the 4 lower bits as a cache. As a consequence:
- the statement
The operation name can be found in cmp_op[opname]
is not true anymore. - the meaning of the cache is not documented but it can be != 0 even for a freshly compiled bytecode and as a consequence the difference is visible in
dis.dis
output
- the statement
MIN_INSTRUMENTED_OPCODE
is not documented but needed to determine what are the "normal" opcodesLOAD_SUPER_ATTR
description could use a code block to describe its stack effect IMOPOP_JUMP_IF_NOT_NONE
andPOP_JUMP_IF_NONE
are still described as pseudo-instructions even though there are not anymore in 3.12CALL_INSTRINSIC_2
stack manipulation description looks wrong.
The description readsPasses STACK[-2], STACK[-1] as the arguments and sets STACK[-1] to the result
, but the implementation pops 2 values from the stackEND_SEND
is not documented- how to account for the presence of
CACHE
instructions following jumping instructions is not described (FOR_ITER and SEND for the time being)
Issue in What's new
BINARY_SLICE
is not mentionedSTORE_SLICE
is not mentionedCLEANUP_THROW
is not mentionedRETURN_CONST
is not mentionedLOAD_FAST_CHECK
is not mentionedEND_SEND
is not mentionedCALL_INSTRINSIC_1/2
are not mentionedFOR_ITER
new behavior is not mentioned- The fact that
POP_JUMP_IF_*
family of instructions are now real instructions is not mentioned YIELD_VALUE
need for an argument is not mentioned- The addition of
dis.hasexc
is not mentioned