Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Bytecode documentation issues for Python 3.12 #107457

Closed
Labels
3.12only security fixesdocsDocumentation in the Doc dir
@MatthieuDartiailh

Description

@MatthieuDartiailh

As part of adding support for Python 3.12 tohttps://github.com/MatthieuDartiailh/bytecode I have identified a number of documentation issues both in thedismodule 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 statementThe 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 indis.dis output
  • MIN_INSTRUMENTED_OPCODE is not documented but needed to determine what are the "normal" opcodes
  • LOAD_SUPER_ATTR description could use a code block to describe its stack effect IMO
  • POP_JUMP_IF_NOT_NONE andPOP_JUMP_IF_NONE are still described as pseudo-instructions even though there are not anymore in 3.12
  • CALL_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 stack
  • END_SEND is not documented
  • how to account for the presence ofCACHE instructions following jumping instructions is not described (FOR_ITER and SEND for the time being)

Issue in What's new

  • BINARY_SLICE is not mentioned
  • STORE_SLICE is not mentioned
  • CLEANUP_THROW is not mentioned
  • RETURN_CONST is not mentioned
  • LOAD_FAST_CHECK is not mentioned
  • END_SEND is not mentioned
  • CALL_INSTRINSIC_1/2 are not mentioned
  • FOR_ITER new behavior is not mentioned
  • The fact thatPOP_JUMP_IF_* family of instructions are now real instructions is not mentioned
  • YIELD_VALUE need for an argument is not mentioned
  • The addition ofdis.hasexc is not mentioned

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.12only security fixesdocsDocumentation in the Doc dir

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp