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

arithmetic-overflow checks during const-eval #23863

Merged
merged 16 commits into from
Apr 1, 2015

Commits on Apr 1, 2015

  1. Added type-specific overflow checks when computing enum discriminant …

    …values.
    
    Moved such overflow checking into one place (in `rustc::middle::ty`,
    since it needs to be run on-demand during `const_eval` in some
    scenarios), and revised `rustc_typeck` accordingly.
    
    (Note that we only check for overflow if program did not provide a
    discriminant value explicitly.)
    
    Fix rust-lang#23030
    
    Fix rust-lang#23221
    
    Fix rust-lang#23235
    pnkfelix committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    4e04d57 View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    36b6d0e View commit details
    Browse the repository at this point in the history
  3. fix post rebase.

    pnkfelix committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    0b57df7 View commit details
    Browse the repository at this point in the history
  4. Fix rust-lang#23890: const-eval _ as usize, _ as isize must dispa…

    …tch to target type.
    pnkfelix committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    792f6aa View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    60289ac View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    2f7658a View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    7875dae View commit details
    Browse the repository at this point in the history
  8. rust_llvm: Add way to reflectively ask if a ValueRef is a known const…

    …ant int.
    
    Add option-returning variants to `const_to_int`/`const_to_uint` that
    never assert fail. (These will be used for overflow checking from
    rustc_trans::trans::consts.)
    pnkfelix committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    2e93e38 View commit details
    Browse the repository at this point in the history
  9. rustc::middle::const_eval : add overflow-checking for {+, -, *}.

    The overflow-checking attempts to accommodate early evaluation where
    we do not have type information yet.
    
    Also, add fixme note about something that has been bothering me.
    pnkfelix committed Apr 1, 2015
    Configuration menu
    Copy the full SHA
    b02f7d2 View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    6808e41 View commit details
    Browse the repository at this point in the history
  11. Configuration menu
    Copy the full SHA
    8d54ea3 View commit details
    Browse the repository at this point in the history
  12. Configuration menu
    Copy the full SHA
    41b3c86 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    1f5e45b View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    1973f7e View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    2243a2c View commit details
    Browse the repository at this point in the history
  16. Configuration menu
    Copy the full SHA
    2a9de1d View commit details
    Browse the repository at this point in the history