Commit 164338ee authored by Luke Wagner's avatar Luke Wagner
Browse files

Bug 832065 - don't use resume point to iterate over phis (r=sstangl)

parent bbda942d
Loading
Loading
Loading
Loading
+5 −4
Original line number Diff line number Diff line
@@ -654,9 +654,9 @@ MBasicBlock::setBackedge(MBasicBlock *pred)
    JS_ASSERT(kind_ == PENDING_LOOP_HEADER);

    // Add exit definitions to each corresponding phi at the entry.
    for (uint32_t i = 0; i < pred->stackDepth(); i++) {
        MPhi *entryDef = entryResumePoint()->getOperand(i)->toPhi();
        MDefinition *exitDef = pred->slots_[i];
    for (MPhiIterator phi = phisBegin(); phi != phisEnd(); phi++) {
        MPhi *entryDef = *phi;
        MDefinition *exitDef = pred->slots_[entryDef->slot()];

        // Assert that we already placed phis for each slot.
        JS_ASSERT(entryDef->block() == this);
@@ -675,7 +675,8 @@ MBasicBlock::setBackedge(MBasicBlock *pred)
        if (!entryDef->addInput(exitDef))
            return false;

        setSlot(i, entryDef);
        JS_ASSERT(entryDef->slot() < pred->stackDepth());
        setSlot(entryDef->slot(), entryDef);
    }

    // We are now a loop header proper