Bug 897926: IonMonkey: Fix execution difference in code refactored by previous patch, r=jandem
authorHannes Verschore <hv1989@gmail.com>
Thu, 05 Sep 2013 15:47:17 +0200
changeset 158641 5ed972e07d6afbcfa5268a07c863b08c204e845c
parent 158640 73be965472ba42c09b737d09e610ec3040652f3c
child 158642 c747fd285dfa33e8c792547c22ffeaf8c8726dae
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjandem
bugs897926
milestone26.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 897926: IonMonkey: Fix execution difference in code refactored by previous patch, r=jandem
js/src/jit/IonBuilder.cpp
--- a/js/src/jit/IonBuilder.cpp
+++ b/js/src/jit/IonBuilder.cpp
@@ -5848,25 +5848,25 @@ IonBuilder::newPendingLoopHeader(MBasicB
 
             // The value of aliased slots are in the callobject. So we can't
             // the value from the baseline frame.
             if (info().isSlotAliased(i))
                 continue;
 
             // Don't bother with expression stack values. The stack should be
             // empty except for let variables (not Ion-compiled) or iterators.
-            uint32_t var = i - info().firstLocalSlot();
-            if (var >= info().nlocals())
+            if (i >= info().firstStackSlot())
                 continue;
 
             MPhi *phi = block->getSlot(i)->toPhi();
 
             // Get the value from the baseline frame.
             Value existingValue;
             uint32_t arg = i - info().firstArgSlot();
+            uint32_t var = i - info().firstLocalSlot();
             if (info().fun() && i == info().thisSlot())
                 existingValue = baselineFrame_->thisValue();
             else if (arg < info().nargs())
                 existingValue = baselineFrame_->unaliasedFormal(arg);
             else
                 existingValue = baselineFrame_->unaliasedVar(var);
 
             // Extract typeset from value.