Skip to content

Use array of size 1 for self_or_null and other instruction inputs that get merged into another array. #123996

Closed
@markshannon

Description

@markshannon

Bug report

We have a common pattern for calls. The stack looks like this: func self_or_null args[oparg] and if self_or_null is not NULL we merge it into the args array. This is error prone however as the code generator thinks self_or_null is a discrete scalar, not part of an array.
We have specific code to workaround this, but I'm not sure that there are lurking bugs.

We should, instead, define self_or_null as an array of size 1. This tells the code generator that it is an array and must be in memory, not a register.

As well as causing issues now, this is necessary for #120024 and #121459.

Linked PRs

Metadata

Metadata

Assignees

No one assigned

    Labels

    3.14bugs and security fixestype-bugAn unexpected behavior, bug, or error

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions