Bug 930702 - IonMonkey: Implement range analysis for boolean constants. r=nbp
authorDan Gohman <sunfish@google.com>
Thu, 24 Oct 2013 20:34:53 -0700
changeset 165874 4dfcb90f5fcd4d3731bc9f70082a0b07b41168b3
parent 165873 7903012822eb4c1b074f0260084190134376c898
child 165875 f030f97fcf107fbd5da84b1bea47a3580426bc29
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
bugs930702
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 930702 - IonMonkey: Implement range analysis for boolean constants. r=nbp
js/src/jit/RangeAnalysis.cpp
--- a/js/src/jit/RangeAnalysis.cpp
+++ b/js/src/jit/RangeAnalysis.cpp
@@ -974,16 +974,19 @@ MBeta::computeRange()
 }
 
 void
 MConstant::computeRange()
 {
     if (value().isNumber()) {
         double d = value().toNumber();
         setRange(Range::NewDoubleRange(d, d));
+    } else if (value().isBoolean()) {
+        bool b = value().toBoolean();
+        setRange(Range::NewInt32Range(b, b));
     }
 }
 
 void
 MCharCodeAt::computeRange()
 {
     // ECMA 262 says that the integer will be non-negative and at most 65535.
     setRange(Range::NewInt32Range(0, 65535));