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

split JUMP_IF_NOT_EXC/EG_MATCH into CHECK_EXC/EG_MATCH + jump #91342

Closed
iritkatriel opened this issue Apr 1, 2022 · 3 comments
Closed

split JUMP_IF_NOT_EXC/EG_MATCH into CHECK_EXC/EG_MATCH + jump #91342

iritkatriel opened this issue Apr 1, 2022 · 3 comments
Assignees
Labels
3.11 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement

Comments

@iritkatriel
Copy link
Member

BPO 47186
Nosy @markshannon, @iritkatriel
PRs
  • bpo-47186: Replace JUMP_IF_NOT_EXC_MATCH by CHECK_EXC_MATCH + jump #32231
  • bpo-47186: Replace JUMP_IF_NOT_EG_MATCH by CHECK_EG_MATCH + jump #32309
  • 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 = 'https://github.com/iritkatriel'
    closed_at = <Date 2022-04-05.11:11:01.086>
    created_at = <Date 2022-04-01.11:48:57.416>
    labels = ['interpreter-core', 'type-feature', '3.11']
    title = 'split JUMP_IF_NOT_EXC/EG_MATCH into CHECK_EXC/EG_MATCH + jump'
    updated_at = <Date 2022-04-05.11:11:01.086>
    user = 'https://github.com/iritkatriel'

    bugs.python.org fields:

    activity = <Date 2022-04-05.11:11:01.086>
    actor = 'iritkatriel'
    assignee = 'iritkatriel'
    closed = True
    closed_date = <Date 2022-04-05.11:11:01.086>
    closer = 'iritkatriel'
    components = ['Interpreter Core']
    creation = <Date 2022-04-01.11:48:57.416>
    creator = 'iritkatriel'
    dependencies = []
    files = []
    hgrepos = []
    issue_num = 47186
    keywords = ['patch']
    message_count = 3.0
    messages = ['416484', '416485', '416770']
    nosy_count = 2.0
    nosy_names = ['Mark.Shannon', 'iritkatriel']
    pr_nums = ['32231', '32309']
    priority = 'normal'
    resolution = 'fixed'
    stage = 'resolved'
    status = 'closed'
    superseder = None
    type = 'enhancement'
    url = 'https://bugs.python.org/issue47186'
    versions = ['Python 3.11']

    @iritkatriel
    Copy link
    Member Author

    It would help bpo-47120 to reduce the number of jump opcodes.

    The exception matching opcodes JUMP_IF_NOT_EXC_MATCH and JUMP_IF_NOT_EG_MATCH are not hot, and we can split them into a check + ordinary jump.

    For JUMP_IF_NOT_EXC_MATCH this is simple because the stack effect is the same for the jump and non-jump case. For JUMP_IF_NOT_EG_MATCH the stack effect will need to be made the same, and the opcodes emitted around it adapted.

    @iritkatriel iritkatriel added the 3.11 only security fixes label Apr 1, 2022
    @iritkatriel iritkatriel self-assigned this Apr 1, 2022
    @iritkatriel iritkatriel added interpreter-core (Objects, Python, Grammar, and Parser dirs) 3.11 only security fixes labels Apr 1, 2022
    @iritkatriel iritkatriel self-assigned this Apr 1, 2022
    @iritkatriel iritkatriel added the interpreter-core (Objects, Python, Grammar, and Parser dirs) label Apr 1, 2022
    @markshannon
    Copy link
    Member

    New changeset 04e07c2 by Irit Katriel in branch 'main':
    bpo-47186: Replace JUMP_IF_NOT_EXC_MATCH by CHECK_EXC_MATCH + jump (GH-32231)
    04e07c2

    @iritkatriel
    Copy link
    Member Author

    New changeset 32091df by Irit Katriel in branch 'main':
    bpo-47186: Replace JUMP_IF_NOT_EG_MATCH by CHECK_EG_MATCH + jump (GH-32309)
    32091df

    @iritkatriel iritkatriel added the type-feature A feature request or enhancement label Apr 5, 2022
    @iritkatriel iritkatriel added the type-feature A feature request or enhancement label Apr 5, 2022
    @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.11 only security fixes interpreter-core (Objects, Python, Grammar, and Parser dirs) type-feature A feature request or enhancement
    Projects
    None yet
    Development

    No branches or pull requests

    2 participants