Bug 990106 part 5 - Assert lack of live uses of recover instructions. r=h4writer

This commit is contained in:
Nicolas B. Pierron 2014-04-29 10:17:52 -07:00
Родитель 0cbc797f38
Коммит f0ca30eb4b
1 изменённых файлов: 10 добавлений и 7 удалений

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

@ -1385,11 +1385,6 @@ jit::AssertBasicGraphCoherency(MIRGraph &graph)
for (size_t i = 0; i < block->numPredecessors(); i++) for (size_t i = 0; i < block->numPredecessors(); i++)
JS_ASSERT(CheckPredecessorImpliesSuccessor(*block, block->getPredecessor(i))); JS_ASSERT(CheckPredecessorImpliesSuccessor(*block, block->getPredecessor(i)));
// Assert that use chains are valid for this instruction.
for (MDefinitionIterator iter(*block); iter; iter++) {
for (uint32_t i = 0, e = iter->numOperands(); i < e; i++)
JS_ASSERT(CheckOperandImpliesUse(*iter, iter->getOperand(i)));
}
for (MResumePointIterator iter(block->resumePointsBegin()); iter != block->resumePointsEnd(); iter++) { for (MResumePointIterator iter(block->resumePointsBegin()); iter != block->resumePointsEnd(); iter++) {
for (uint32_t i = 0, e = iter->numOperands(); i < e; i++) { for (uint32_t i = 0, e = iter->numOperands(); i < e; i++) {
if (iter->getUseFor(i)->hasProducer()) if (iter->getUseFor(i)->hasProducer())
@ -1398,11 +1393,16 @@ jit::AssertBasicGraphCoherency(MIRGraph &graph)
} }
for (MPhiIterator phi(block->phisBegin()); phi != block->phisEnd(); phi++) { for (MPhiIterator phi(block->phisBegin()); phi != block->phisEnd(); phi++) {
JS_ASSERT(phi->numOperands() == block->numPredecessors()); JS_ASSERT(phi->numOperands() == block->numPredecessors());
MOZ_ASSERT(!phi->isRecoveredOnBailout());
} }
for (MDefinitionIterator iter(*block); iter; iter++) { for (MDefinitionIterator iter(*block); iter; iter++) {
JS_ASSERT(iter->block() == *block); JS_ASSERT(iter->block() == *block);
for (MUseIterator i(iter->usesBegin()); i != iter->usesEnd(); i++)
JS_ASSERT(CheckUseImpliesOperand(*iter, *i)); // Assert that use chains are valid for this instruction.
for (uint32_t i = 0, end = iter->numOperands(); i < end; i++)
JS_ASSERT(CheckOperandImpliesUse(*iter, iter->getOperand(i)));
for (MUseIterator use(iter->usesBegin()); use != iter->usesEnd(); use++)
JS_ASSERT(CheckUseImpliesOperand(*iter, *use));
if (iter->isInstruction()) { if (iter->isInstruction()) {
if (MResumePoint *resume = iter->toInstruction()->resumePoint()) { if (MResumePoint *resume = iter->toInstruction()->resumePoint()) {
@ -1410,6 +1410,9 @@ jit::AssertBasicGraphCoherency(MIRGraph &graph)
JS_ASSERT(ins->block() == iter->block()); JS_ASSERT(ins->block() == iter->block());
} }
} }
if (iter->isRecoveredOnBailout())
MOZ_ASSERT(!iter->hasLiveDefUses());
} }
} }