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

[MIR] Implement overflow checking #33255

Closed
wants to merge 5 commits into from
Closed

Commits on Apr 28, 2016

  1. Check arithmetic in the MIR

    Add, Sub, Mul, Shl, and Shr are checked using a new Rvalue:
    CheckedBinaryOp, while Div, Rem and Neg are handled with explicit checks
    in the MIR.
    Aatch committed Apr 28, 2016
    Configuration menu
    Copy the full SHA
    a50a1c2 View commit details
    Browse the repository at this point in the history
  2. Add a with_cond method

    Factors out the common pattern across the several places that do
    arithmetic checks
    Aatch committed Apr 28, 2016
    Configuration menu
    Copy the full SHA
    196de1a View commit details
    Browse the repository at this point in the history
  3. Configuration menu
    Copy the full SHA
    6d3f7a9 View commit details
    Browse the repository at this point in the history

Commits on Apr 29, 2016

  1. Change with_cond to build_cond_br

    This is simpler to work with than `with_cond`.
    Aatch committed Apr 29, 2016
    Configuration menu
    Copy the full SHA
    60a0813 View commit details
    Browse the repository at this point in the history
  2. Replace the fallback case with a bug!

    This branch shouldn't be hit so if it is, it's probably a mistake.
    Aatch committed Apr 29, 2016
    Configuration menu
    Copy the full SHA
    3d33d46 View commit details
    Browse the repository at this point in the history