Skip to content

Mir: introduce overflow operations #29769

Closed
@nikomatsakis

Description

@nikomatsakis

Currently the MIR doesn't handle overflow. My intended design was to add 'overflow operations' that yield a tuple (overflow-flag, result). This is roughly how LLVM does things. We would then check for overflow and panic if it occurs. @Aatch independently described this design as option 3.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-MIRArea: Mid-level IR (MIR) - https://blog.rust-lang.org/2016/04/19/MIR.htmlI-needs-decisionIssue: In need of a decision.T-compilerRelevant to the compiler team, which will review and decide on the PR/issue.

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions