diff --git a/js/src/jit/Lowering.cpp b/js/src/jit/Lowering.cpp index d98a677aa11..125de170601 100644 --- a/js/src/jit/Lowering.cpp +++ b/js/src/jit/Lowering.cpp @@ -1403,7 +1403,7 @@ static void MaybeSetRecoversInput(S *mir, T *lir) { MOZ_ASSERT(lir->mirRaw() == mir); - if (!mir->fallible()) + if (!mir->fallible() || !lir->snapshot()) return; if (lir->output()->policy() != LDefinition::MUST_REUSE_INPUT) @@ -1647,7 +1647,7 @@ LIRGenerator::visitStart(MStart *start) LStart *lir = new(alloc()) LStart; assignSnapshot(lir, Bailout_InitialState); - if (start->startType() == MStart::StartType_Default) + if (start->startType() == MStart::StartType_Default && lir->snapshot()) lirGraph_.setEntrySnapshot(lir->snapshot()); add(lir); } diff --git a/js/src/jit/shared/Lowering-shared.cpp b/js/src/jit/shared/Lowering-shared.cpp index be45204bedd..5d6b17a7313 100644 --- a/js/src/jit/shared/Lowering-shared.cpp +++ b/js/src/jit/shared/Lowering-shared.cpp @@ -256,7 +256,7 @@ LIRGeneratorShared::buildSnapshot(LInstruction *ins, MResumePoint *rp, BailoutKi } #endif -bool +void LIRGeneratorShared::assignSnapshot(LInstruction *ins, BailoutKind kind) { // assignSnapshot must be called before define/add, since @@ -264,11 +264,10 @@ LIRGeneratorShared::assignSnapshot(LInstruction *ins, BailoutKind kind) MOZ_ASSERT(ins->id() == 0); LSnapshot *snapshot = buildSnapshot(ins, lastResumePoint_, kind); - if (!snapshot) - return false; - - ins->assignSnapshot(snapshot); - return true; + if (snapshot) + ins->assignSnapshot(snapshot); + else + gen->abort("buildSnapshot failed"); } void diff --git a/js/src/jit/shared/Lowering-shared.h b/js/src/jit/shared/Lowering-shared.h index e2907131e3f..6098ec1ab26 100644 --- a/js/src/jit/shared/Lowering-shared.h +++ b/js/src/jit/shared/Lowering-shared.h @@ -197,7 +197,7 @@ class LIRGeneratorShared : public MDefinitionVisitor // effects (if any), it may check pre-conditions and bailout if they do not // hold. This function informs the register allocator that it will need to // capture appropriate state. - bool assignSnapshot(LInstruction *ins, BailoutKind kind); + void assignSnapshot(LInstruction *ins, BailoutKind kind); // Marks this instruction as needing to call into either the VM or GC. This // function may build a snapshot that captures the result of its own