Bug 1122886 - Relax on-OSR assertions to allow null lastFramePtr when profiling is turned on. r=h4writer

This commit is contained in:
Kannan Vijayan 2015-01-23 13:57:47 -05:00
Родитель 38ef50f263
Коммит 0466d0b1fa
1 изменённых файлов: 8 добавлений и 0 удалений

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

@ -1015,6 +1015,14 @@ ICWarmUpCounter_Fallback::Compiler::generateStubCode(MacroAssembler &masm)
masm.branch32(Assembler::Equal, addressOfEnabled, Imm32(0), &checkOk); masm.branch32(Assembler::Equal, addressOfEnabled, Imm32(0), &checkOk);
masm.loadPtr(AbsoluteAddress((void*)&cx->mainThread().jitActivation), scratchReg); masm.loadPtr(AbsoluteAddress((void*)&cx->mainThread().jitActivation), scratchReg);
masm.loadPtr(Address(scratchReg, JitActivation::offsetOfLastProfilingFrame()), scratchReg); masm.loadPtr(Address(scratchReg, JitActivation::offsetOfLastProfilingFrame()), scratchReg);
// It may be the case that we entered the baseline frame with
// profiling turned off on, then in a call within a loop (i.e. a
// callee frame), turn on profiling, then return to this frame,
// and then OSR with profiling turned on. In this case, allow for
// lastProfilingFrame to be null.
masm.branchPtr(Assembler::Equal, scratchReg, Imm32(0), &checkOk);
masm.branchPtr(Assembler::Equal, scratchReg, BaselineStackReg, &checkOk); masm.branchPtr(Assembler::Equal, scratchReg, BaselineStackReg, &checkOk);
masm.assumeUnreachable("Baseline OSR lastProfilingFrame mismatch."); masm.assumeUnreachable("Baseline OSR lastProfilingFrame mismatch.");
masm.bind(&checkOk); masm.bind(&checkOk);