diff options
author | Alon Zakai <alonzakai@gmail.com> | 2016-03-28 11:18:41 -0700 |
---|---|---|
committer | Alon Zakai <alonzakai@gmail.com> | 2016-03-28 11:18:41 -0700 |
commit | b8d01b47e5f53a92cd5db528d1939462f919d5f6 (patch) | |
tree | 587745036c9edd39ebfb9175eac293c81ff7684a /src/support/safe_integer.cpp | |
parent | cb4322e8504cce394383e0a5ebcf37c2a4d5cc18 (diff) | |
parent | c9ebb2e4f469831d0db0b8e14ac74778380ab3dd (diff) | |
download | binaryen-b8d01b47e5f53a92cd5db528d1939462f919d5f6.tar.gz binaryen-b8d01b47e5f53a92cd5db528d1939462f919d5f6.tar.bz2 binaryen-b8d01b47e5f53a92cd5db528d1939462f919d5f6.zip |
Merge pull request #282 from WebAssembly/safe-int-fixes
Remove bogus asserts from safe_integer casts
Diffstat (limited to 'src/support/safe_integer.cpp')
-rw-r--r-- | src/support/safe_integer.cpp | 4 |
1 files changed, 0 insertions, 4 deletions
diff --git a/src/support/safe_integer.cpp b/src/support/safe_integer.cpp index dbe62ca52..191296e1e 100644 --- a/src/support/safe_integer.cpp +++ b/src/support/safe_integer.cpp @@ -34,14 +34,12 @@ bool wasm::isSInteger32(double x) { } uint32_t wasm::toUInteger32(double x) { - assert(isUInteger32(x)); return x < std::numeric_limits<uint32_t>::max() ? x : std::numeric_limits<uint32_t>::max(); } int32_t wasm::toSInteger32(double x) { - assert(isSInteger32(x)); return x > std::numeric_limits<int32_t>::min() && x < std::numeric_limits<int32_t>::max() ? x @@ -59,14 +57,12 @@ bool wasm::isSInteger64(double x) { } uint64_t wasm::toUInteger64(double x) { - assert(isUInteger64(x)); return x < (double)std::numeric_limits<uint64_t>::max() ? (uint64_t)x : std::numeric_limits<uint64_t>::max(); } int64_t wasm::toSInteger64(double x) { - assert(isSInteger64(x)); return x > (double)std::numeric_limits<int64_t>::min() && x < (double)std::numeric_limits<int64_t>::max() ? (int64_t)x |