Bug 1093356 - Refine the range of constants outside the int32 range r=nbp,h4writer
authorDan Gohman <sunfish@mozilla.com>
Tue, 04 Nov 2014 10:26:31 -0800
changeset 213946 2e8c12e04a14bcf717346621dd8177c2c45f842c
parent 213945 f718ec4b4cb013a60fa3ce2941208eb07f456be8
child 213947 1d0c12148cf658c4b77c03b4b6c69a475210a907
push id27768
push userkwierso@gmail.com
push dateWed, 05 Nov 2014 02:19:03 +0000
treeherdermozilla-central@a1823d3c7365 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnbp, h4writer
bugs1093356
milestone36.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
Bug 1093356 - Refine the range of constants outside the int32 range r=nbp,h4writer
js/src/jit/RangeAnalysis.cpp
--- a/js/src/jit/RangeAnalysis.cpp
+++ b/js/src/jit/RangeAnalysis.cpp
@@ -604,23 +604,29 @@ void
 Range::setDouble(double l, double h)
 {
     MOZ_ASSERT(!(l > h));
 
     // Infer lower_, upper_, hasInt32LowerBound_, and hasInt32UpperBound_.
     if (l >= INT32_MIN && l <= INT32_MAX) {
         lower_ = int32_t(::floor(l));
         hasInt32LowerBound_ = true;
+    } else if (l >= INT32_MAX) {
+        lower_ = INT32_MAX;
+        hasInt32LowerBound_ = true;
     } else {
         lower_ = INT32_MIN;
         hasInt32LowerBound_ = false;
     }
     if (h >= INT32_MIN && h <= INT32_MAX) {
         upper_ = int32_t(::ceil(h));
         hasInt32UpperBound_ = true;
+    } else if (h <= INT32_MIN) {
+        upper_ = INT32_MIN;
+        hasInt32UpperBound_ = true;
     } else {
         upper_ = INT32_MAX;
         hasInt32UpperBound_ = false;
     }
 
     // Infer max_exponent_.
     uint16_t lExp = ExponentImpliedByDouble(l);
     uint16_t hExp = ExponentImpliedByDouble(h);