Fix slot computation bug in newCallObject (bug 793257, r=luke).

This commit is contained in:
David Anderson 2012-09-24 13:48:21 -07:00
Родитель db8d762040
Коммит a2df9cbb13
1 изменённых файлов: 1 добавлений и 1 удалений

Просмотреть файл

@ -3453,7 +3453,7 @@ IonBuilder::createCallObject(MDefinition *callee, MDefinition *scope)
unsigned slot = i.scopeSlot();
unsigned formal = i.frameIndex();
MDefinition *param = current->getSlot(info().argSlot(formal));
if (slots->type() == MIRType_Slots)
if (slot >= templateObj->numFixedSlots())
current->add(MStoreSlot::New(slots, slot - templateObj->numFixedSlots(), param));
else
current->add(MStoreFixedSlot::New(callObj, slot, param));