Ranges should all be signed, never unsigned, even when the operation should logically be unsigned (bug 765119, r=djvj)
authorMarty Rosenberg <mrosenberg@mozilla.com>
Sun, 07 Oct 2012 23:19:23 -0400
changeset 109625 7a0094bcd18650b5cedcc24f1a6e05ee502016e1
parent 109624 92018e33385dec11941725f76d40de60f86d3140
child 109626 29cb1f0d796c6e996c466f0b907cdb1cfc9c7d65
push id23636
push usergsharp@mozilla.com
push dateMon, 08 Oct 2012 08:08:19 +0000
treeherdermozilla-central@24cf40690042 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersdjvj
bugs765119
milestone18.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Ranges should all be signed, never unsigned, even when the operation should logically be unsigned (bug 765119, r=djvj)
js/src/ion/RangeAnalysis.cpp
--- a/js/src/ion/RangeAnalysis.cpp
+++ b/js/src/ion/RangeAnalysis.cpp
@@ -337,21 +337,21 @@ Range::subTruncate(const Range *lhs, con
     Range ret = Truncate((int64_t)lhs->lower_ - (int64_t)rhs->upper_,
                          (int64_t)lhs->upper_ - (int64_t)rhs->lower_);
     return ret;
 }
 
 Range
 Range::and_(const Range *lhs, const Range *rhs)
 {
-    uint64_t lower = 0;
+    int64_t lower = 0;
     // If both numbers can be negative, issues can be had.
     if (lhs->lower_ < 0 && rhs->lower_ < 0)
         lower = INT_MIN;
-    uint64_t upper = lhs->upper_;
+    int64_t upper = lhs->upper_;
     if (rhs->upper_ < lhs->upper_)
         upper = rhs->upper_;
     Range ret(lower, upper);
     return ret;
 
 }
 Range
 Range::mul(const Range *lhs, const Range *rhs)