зеркало из https://github.com/mozilla/gecko-dev.git
Bug 1871089 - Load ICStub from the frame instead of storing it separately. r=iain
Differential Revision: https://phabricator.services.mozilla.com/D197608
This commit is contained in:
Родитель
732f7d78d6
Коммит
6d17e93756
|
@ -3386,7 +3386,6 @@ void BaselineCacheIRCompiler::createThis(Register argcReg, Register calleeReg,
|
|||
// Save live registers that don't have to be traced.
|
||||
LiveGeneralRegisterSet liveNonGCRegs;
|
||||
liveNonGCRegs.add(argcReg);
|
||||
liveNonGCRegs.add(ICStubReg);
|
||||
masm.PushRegsInMask(liveNonGCRegs);
|
||||
|
||||
// CreateThis takes two arguments: callee, and newTarget.
|
||||
|
@ -3423,6 +3422,8 @@ void BaselineCacheIRCompiler::createThis(Register argcReg, Register calleeReg,
|
|||
|
||||
// Restore saved registers.
|
||||
masm.PopRegsInMask(liveNonGCRegs);
|
||||
Address stubAddr(FramePointer, BaselineStubFrameLayout::ICStubOffsetFromFP);
|
||||
masm.loadPtr(stubAddr, ICStubReg);
|
||||
|
||||
// Save |this| value back into pushed arguments on stack.
|
||||
MOZ_ASSERT(!liveNonGCRegs.aliases(JSReturnOperand));
|
||||
|
|
|
@ -717,6 +717,16 @@ static void MarkActiveICScriptsAndCopyStubs(
|
|||
ICCacheIRStub* stub = layout->maybeStubPtr()->toCacheIRStub();
|
||||
ICCacheIRStub* newStub = stub->clone(cx->runtime(), newStubSpace);
|
||||
layout->setStubPtr(newStub);
|
||||
|
||||
JSJitFrameIter parentFrame(frame);
|
||||
++parentFrame;
|
||||
BaselineFrame* blFrame = parentFrame.baselineFrame();
|
||||
jsbytecode* pc;
|
||||
parentFrame.baselineScriptAndPc(nullptr, &pc);
|
||||
uint32_t pcOffset = blFrame->script()->pcToOffset(pc);
|
||||
if (blFrame->icScript()->hasInlinedChild(pcOffset)) {
|
||||
blFrame->icScript()->findInlinedChild(pcOffset)->setActive();
|
||||
}
|
||||
}
|
||||
break;
|
||||
}
|
||||
|
|
Загрузка…
Ссылка в новой задаче