Bug 1102964 - Fix optimized build unused variable warnings in jit/. r=sunfish
authorBenjamin Peterson <benjamin@python.org>
Fri, 21 Nov 2014 18:51:02 -0500
changeset 216974 2a1e5fe6f2892eff40ace8eedface5fd8a533747
parent 216973 012e11e54840c6d7472cbe5add2c8cbc60a9724d
child 216975 24bebb8f489a86f9d2a97aa594c11e237b5ded6f
push id27871
push usercbook@mozilla.com
push dateMon, 24 Nov 2014 12:32:57 +0000
treeherdermozilla-central@b8e1741b7d5c [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewerssunfish
bugs1102964
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 1102964 - Fix optimized build unused variable warnings in jit/. r=sunfish
js/src/jit/BaselineDebugModeOSR.cpp
js/src/jit/RangeAnalysis.h
--- a/js/src/jit/BaselineDebugModeOSR.cpp
+++ b/js/src/jit/BaselineDebugModeOSR.cpp
@@ -387,17 +387,18 @@ PatchBaselineFramesForDebugMode(JSContex
                 break;
             }
 
             // Cases F and G above.
             //
             // We undo a previous recompile by handling cases B, C, D, and E
             // like normal, except that we retrieved the pc information via
             // the previous OSR debug info stashed on the frame.
-            if (BaselineDebugModeOSRInfo *info = iter.baselineFrame()->getDebugModeOSRInfo()) {
+            BaselineDebugModeOSRInfo *info = iter.baselineFrame()->getDebugModeOSRInfo();
+            if (info) {
                 MOZ_ASSERT(info->pc == pc);
                 MOZ_ASSERT(info->frameKind == kind);
 
                 // Case G, might need to undo B, C, D, or E.
                 MOZ_ASSERT_IF(script->baselineScript()->hasDebugInstrumentation(),
                               kind == ICEntry::Kind_CallVM ||
                               kind == ICEntry::Kind_DebugTrap ||
                               kind == ICEntry::Kind_DebugPrologue ||
--- a/js/src/jit/RangeAnalysis.h
+++ b/js/src/jit/RangeAnalysis.h
@@ -229,17 +229,18 @@ class Range : public TempObject {
         // lower_/upper_ fields. We have to add 1 to the max_exponent_ when
         // canHaveFractionalPart_ is true in order to accomodate
         // fractional offsets. For example, 2147483647.9 is greater than
         // INT32_MAX, so a range containing that value will have
         // hasInt32UpperBound_ set to false, however that value also has
         // exponent 30, which is strictly less than MaxInt32Exponent. For
         // another example, 1.9 has an exponent of 0 but requires upper_ to be
         // at least 2, which has exponent 1.
-        uint32_t adjustedExponent = max_exponent_ + (canHaveFractionalPart_ ? 1 : 0);
+        mozilla::DebugOnly<uint32_t> adjustedExponent = max_exponent_ +
+            (canHaveFractionalPart_ ? 1 : 0);
         MOZ_ASSERT_IF(!hasInt32LowerBound_ || !hasInt32UpperBound_,
                       adjustedExponent >= MaxInt32Exponent);
         MOZ_ASSERT(adjustedExponent >= mozilla::FloorLog2(mozilla::Abs(upper_)));
         MOZ_ASSERT(adjustedExponent >= mozilla::FloorLog2(mozilla::Abs(lower_)));
 
         // The following are essentially static assertions, but FloorLog2 isn't
         // trivially suitable for constexpr :(.
         MOZ_ASSERT(mozilla::FloorLog2(JSVAL_INT_MIN) == MaxInt32Exponent);