Bug 1106171 - Lowering should not copy resume points to join-blocks. r=bhackett

This commit is contained in:
Nicolas B. Pierron 2014-12-05 20:18:44 +01:00
parent 005a19658a
commit 8d82fbb5f3

View File

@ -4274,10 +4274,15 @@ LIRGenerator::visitBlock(MBasicBlock *block)
// basic block. This is used to handle fallible code which is moved/added
// into split edge blocks, which do not have resume points. See
// SplitCriticalEdgesForBlock.
//
// When folding conditions, we might create split-edge blocks which have
// multiple predecessors, in such case it is invalid to have any instruction
// in these blocks, as these blocks have no associated pc, thus we cannot
// safely bailout from such block.
if (lastResumePoint_) {
for (size_t s = 0; s < block->numSuccessors(); s++) {
MBasicBlock *succ = block->getSuccessor(s);
if (!succ->entryResumePoint()) {
if (!succ->entryResumePoint() && succ->numPredecessors() == 1) {
MOZ_ASSERT(succ->isSplitEdge());
MOZ_ASSERT(succ->phisBegin() == succ->phisEnd());
succ->setEntryResumePoint(lastResumePoint_);