Bug 897926: IonMonkey: Fix execution difference in code refactored by previous patch, r=jandem

This commit is contained in:
Hannes Verschore 2013-09-05 15:47:17 +02:00
parent a851257fbe
commit 73bb68b253

View File

@ -5853,8 +5853,7 @@ IonBuilder::newPendingLoopHeader(MBasicBlock *predecessor, jsbytecode *pc, bool
// 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();
@ -5862,6 +5861,7 @@ IonBuilder::newPendingLoopHeader(MBasicBlock *predecessor, jsbytecode *pc, bool
// 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())