Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support of NOP and EXTENDED_ARG in stack_effect() #77515

Closed
serhiy-storchaka opened this issue Apr 22, 2018 · 2 comments
Closed

Add support of NOP and EXTENDED_ARG in stack_effect() #77515

serhiy-storchaka opened this issue Apr 22, 2018 · 2 comments
Labels
3.8 (EOL) end of life stdlib Python modules in the Lib dir type-feature A feature request or enhancement

Comments

@serhiy-storchaka
Copy link
Member

BPO 33334
Nosy @larryhastings, @serhiy-storchaka
PRs
  • bpo-33334: Support NOP and EXTENDED_ARG in dis.stack_effect(). #6566
  • Note: these values reflect the state of the issue at the time it was migrated and might not reflect the current state.

    Show more details

    GitHub fields:

    assignee = None
    closed_at = <Date 2018-04-25.19:06:05.653>
    created_at = <Date 2018-04-22.17:11:17.147>
    labels = ['3.8', 'type-feature', 'library']
    title = 'Add support of NOP and EXTENDED_ARG in stack_effect()'
    updated_at = <Date 2018-04-25.19:06:05.653>
    user = 'https://github.com/serhiy-storchaka'

    bugs.python.org fields:

    activity = <Date 2018-04-25.19:06:05.653>
    actor = 'serhiy.storchaka'
    assignee = 'none'
    closed = True
    closed_date = <Date 2018-04-25.19:06:05.653>
    closer = 'serhiy.storchaka'
    components = ['Library (Lib)']
    creation = <Date 2018-04-22.17:11:17.147>
    creator = 'serhiy.storchaka'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 33334
    keywords = ['patch']
    message_count = 2.0
    messages = ['315622', '315758']
    nosy_count = 2.0
    nosy_names = ['larry', 'serhiy.storchaka']
    pr_nums = ['6566']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue33334'
    versions = ['Python 3.8']

    @serhiy-storchaka
    Copy link
    Member Author

    Currently dis.stack_effect() doesn't support opcodes NOP and EXTENDED_ARG. NOP is never emitted by the standard compiler (it is temporary added in the peephole optimizer, but later it is removed). EXTENDED_ARG is a special case, it is considered as a part of long instructions.

    dis.stack_effect() itself is not used in the dis module. It can be used in the third-party code, and the third-party code can produce bytecode with non-standard use of NOP and EXTENDED_ARG. Supporting them in dis.stack_effect() can avoid the need of special casing them in the third-party code.

    I don't know whether this is a bug fix or a new feature.

    @serhiy-storchaka serhiy-storchaka added 3.8 (EOL) end of life stdlib Python modules in the Lib dir labels Apr 22, 2018
    @serhiy-storchaka
    Copy link
    Member Author

    New changeset 57faf34 by Serhiy Storchaka in branch 'master':
    bpo-33334: Support NOP and EXTENDED_ARG in dis.stack_effect(). (bpo-6566)
    57faf34

    @serhiy-storchaka serhiy-storchaka added the type-feature A feature request or enhancement label Apr 25, 2018
    @ezio-melotti ezio-melotti transferred this issue from another repository Apr 10, 2022
    Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
    Labels
    3.8 (EOL) end of life stdlib Python modules in the Lib dir type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    1 participant