Bug 915846 - IonMonkey: Make Range's setLowerInit and setUpperInit methods private. r=nbp
authorDan Gohman <sunfish@google.com>
Thu, 19 Sep 2013 18:31:32 -0700
changeset 161842 644fe03f2bd489c1282c804b3d923b1ce0c7a0ca
parent 161841 99240d780042570db62e92ab96823f871627ff0d
child 161843 bbb3d10d2c1ce6e068ee84705a1f5bde94b5b188
push id3066
push userakeybl@mozilla.com
push dateMon, 09 Dec 2013 19:58:46 +0000
treeherdermozilla-beta@a31a0dce83aa [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersnbp
bugs915846
milestone27.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 915846 - IonMonkey: Make Range's setLowerInit and setUpperInit methods private. r=nbp
js/src/jit/RangeAnalysis.h
--- a/js/src/jit/RangeAnalysis.h
+++ b/js/src/jit/RangeAnalysis.h
@@ -161,16 +161,39 @@ class Range : public TempObject {
 
     bool canHaveFractionalPart_;
     uint16_t max_exponent_;
 
     // Any symbolic lower or upper bound computed for this term.
     const SymbolicBound *symbolicLower_;
     const SymbolicBound *symbolicUpper_;
 
+    void setLowerInit(int64_t x) {
+        if (x > JSVAL_INT_MAX) {
+            lower_ = JSVAL_INT_MAX;
+            hasInt32LowerBound_ = true;
+        } else if (x < JSVAL_INT_MIN) {
+            dropInt32LowerBound();
+        } else {
+            lower_ = int32_t(x);
+            hasInt32LowerBound_ = true;
+        }
+    }
+    void setUpperInit(int64_t x) {
+        if (x > JSVAL_INT_MAX) {
+            dropInt32UpperBound();
+        } else if (x < JSVAL_INT_MIN) {
+            upper_ = JSVAL_INT_MIN;
+            hasInt32UpperBound_ = true;
+        } else {
+            upper_ = int32_t(x);
+            hasInt32UpperBound_ = true;
+        }
+    }
+
   public:
     Range()
         : lower_(JSVAL_INT_MIN),
           hasInt32LowerBound_(false),
           upper_(JSVAL_INT_MAX),
           hasInt32UpperBound_(false),
           canHaveFractionalPart_(true),
           max_exponent_(MaxDoubleExponent),
@@ -320,43 +343,21 @@ class Range : public TempObject {
     int32_t lower() const {
         return lower_;
     }
 
     int32_t upper() const {
         return upper_;
     }
 
-    void setLowerInit(int64_t x) {
-        if (x > JSVAL_INT_MAX) { // c.c
-            lower_ = JSVAL_INT_MAX;
-            hasInt32LowerBound_ = true;
-        } else if (x < JSVAL_INT_MIN) {
-            dropInt32LowerBound();
-        } else {
-            lower_ = (int32_t)x;
-            hasInt32LowerBound_ = true;
-        }
-    }
     void setLower(int64_t x) {
         setLowerInit(x);
         rectifyExponent();
         JS_ASSERT_IF(!hasInt32LowerBound_, lower_ == JSVAL_INT_MIN);
     }
-    void setUpperInit(int64_t x) {
-        if (x > JSVAL_INT_MAX) {
-            dropInt32UpperBound();
-        } else if (x < JSVAL_INT_MIN) { // c.c
-            upper_ = JSVAL_INT_MIN;
-            hasInt32UpperBound_ = true;
-        } else {
-            upper_ = (int32_t)x;
-            hasInt32UpperBound_ = true;
-        }
-    }
     void setUpper(int64_t x) {
         setUpperInit(x);
         rectifyExponent();
         JS_ASSERT_IF(!hasInt32UpperBound_, upper_ == JSVAL_INT_MAX);
     }
 
     void setInt32() {
         hasInt32LowerBound_ = true;