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 // Don't bother with expression stack values. The stack should be
// empty except for let variables (not Ion-compiled) or iterators. // empty except for let variables (not Ion-compiled) or iterators.
uint32_t var = i - info().firstLocalSlot(); if (i >= info().firstStackSlot())
if (var >= info().nlocals())
continue; continue;
MPhi *phi = block->getSlot(i)->toPhi(); MPhi *phi = block->getSlot(i)->toPhi();
@ -5862,6 +5861,7 @@ IonBuilder::newPendingLoopHeader(MBasicBlock *predecessor, jsbytecode *pc, bool
// Get the value from the baseline frame. // Get the value from the baseline frame.
Value existingValue; Value existingValue;
uint32_t arg = i - info().firstArgSlot(); uint32_t arg = i - info().firstArgSlot();
uint32_t var = i - info().firstLocalSlot();
if (info().fun() && i == info().thisSlot()) if (info().fun() && i == info().thisSlot())
existingValue = baselineFrame_->thisValue(); existingValue = baselineFrame_->thisValue();
else if (arg < info().nargs()) else if (arg < info().nargs())