Skip to content

_GUARD_TOS_ANY_SET missing sym_set_type after NOP optimization #145214

Closed

Description

@corona10

op(_GUARD_TOS_ANY_SET, (tos -- tos)) {
if (sym_matches_type(tos, &PySet_Type) ||
sym_matches_type(tos, &PyFrozenSet_Type))
{
ADD_OP(_NOP, 0, 0);
}
}

The optimizer should narrow the symbolic type so that
subsequent instructions can benefit from the known type. The fix would be to add
sym_set_type(tos, tp) consistent with _GUARD_TOS_ANY_DICT.

Linked PRs

Activity

  1. self-assigned this
    on Feb 25, 2026
  2. corona10 commented on Feb 25, 2026

    @corona10
    MemberAuthor
  3. added a commit that references this issue on Feb 25, 2026
  4. added a commit that references this issue on Mar 3, 2026
  5. corona10 commented on Mar 3, 2026

    @corona10
    MemberAuthor

    I’m going to close this issue now. Thank you for the review and guidance, @markshannon, @Fidget-Spinner, and @cocolato.

  6. added a commit that references this issue on Apr 25, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

interpreter-core(Objects, Python, Grammar, and Parser dirs)topic-JITtype-bugAn unexpected behavior, bug, or error

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions