about summary refs log tree commit diff
path: root/src/rustllvm/ExecutionEngineWrapper.cpp
diff options
context:
space:
mode:
authorFelix S. Klock II <pnkfelix@pnkfx.org>2015-02-19 15:14:48 +0100
committerFelix S. Klock II <pnkfelix@pnkfx.org>2015-03-03 12:10:57 +0100
commitc8db89aa82573b89481fde598da6e54371f266cb (patch)
treebf3fda792aca94eeca3c413b64c0837a896bf448 /src/rustllvm/ExecutionEngineWrapper.cpp
parent4394720dae12c119a9b1aed492b1b24ee089d808 (diff)
downloadrust-c8db89aa82573b89481fde598da6e54371f266cb.tar.gz
rust-c8db89aa82573b89481fde598da6e54371f266cb.zip
Accommodate arith-overflow in `core::num`, `std::num`, `coretest::num`.
 * `core::num`: adjust `UnsignedInt::is_power_of_two`,
   `UnsignedInt::next_power_of_two`, `Int::pow`.

   In particular for `Int::pow`: (1.) do not panic when `base`
   overflows if `acc` never observes the overflowed `base`, and (2.)
   if `acc` does observe the overflowed `base`, make sure we only
   panic if we would have otherwise (e.g. during a computation of
   `base * base`).

 * also in `core::num`: avoid underflow during computation of `uint::MAX`.

 * `std::num`: adjust tests `uint::test_uint_from_str_overflow`,
   `uint::test_uint_to_str_overflow`, `strconv`

 * `coretest::num`: adjust `test::test_int_from_str_overflow`.
Diffstat (limited to 'src/rustllvm/ExecutionEngineWrapper.cpp')
0 files changed, 0 insertions, 0 deletions