зеркало из https://github.com/mozilla/gecko-dev.git
Bug 989344 part 2 - Share LRecoverInfo between LSnapshots. r=jandem
This commit is contained in:
Родитель
e0b778bf68
Коммит
ec55847d33
|
@ -57,17 +57,21 @@ LIRGeneratorShared::lowerTypedPhiInput(MPhi *phi, uint32_t inputPosition, LBlock
|
|||
}
|
||||
|
||||
LRecoverInfo *
|
||||
LIRGeneratorShared::buildRecover(MResumePoint *rp)
|
||||
LIRGeneratorShared::getRecoverInfo(MResumePoint *rp)
|
||||
{
|
||||
LRecoverInfo *recover = LRecoverInfo::New(gen, rp);
|
||||
return recover;
|
||||
if (cachedRecoverInfo_ && cachedRecoverInfo_->mir() == rp)
|
||||
return cachedRecoverInfo_;
|
||||
|
||||
LRecoverInfo *recoverInfo = LRecoverInfo::New(gen, rp);
|
||||
cachedRecoverInfo_ = recoverInfo;
|
||||
return recoverInfo;
|
||||
}
|
||||
|
||||
#ifdef JS_NUNBOX32
|
||||
LSnapshot *
|
||||
LIRGeneratorShared::buildSnapshot(LInstruction *ins, MResumePoint *rp, BailoutKind kind)
|
||||
{
|
||||
LRecoverInfo *recover = buildRecover(rp);
|
||||
LRecoverInfo *recover = getRecoverInfo(rp);
|
||||
if (!recover)
|
||||
return nullptr;
|
||||
|
||||
|
@ -125,7 +129,7 @@ LIRGeneratorShared::buildSnapshot(LInstruction *ins, MResumePoint *rp, BailoutKi
|
|||
LSnapshot *
|
||||
LIRGeneratorShared::buildSnapshot(LInstruction *ins, MResumePoint *rp, BailoutKind kind)
|
||||
{
|
||||
LRecoverInfo *recover = buildRecover(rp);
|
||||
LRecoverInfo *recover = getRecoverInfo(rp);
|
||||
if (!recover)
|
||||
return nullptr;
|
||||
|
||||
|
|
|
@ -31,6 +31,7 @@ class LIRGeneratorShared : public MInstructionVisitorWithDefaults
|
|||
LIRGraph &lirGraph_;
|
||||
LBlock *current;
|
||||
MResumePoint *lastResumePoint_;
|
||||
LRecoverInfo *cachedRecoverInfo_;
|
||||
LOsiPoint *osiPoint_;
|
||||
|
||||
public:
|
||||
|
@ -39,6 +40,7 @@ class LIRGeneratorShared : public MInstructionVisitorWithDefaults
|
|||
graph(graph),
|
||||
lirGraph_(lirGraph),
|
||||
lastResumePoint_(nullptr),
|
||||
cachedRecoverInfo_(nullptr),
|
||||
osiPoint_(nullptr)
|
||||
{ }
|
||||
|
||||
|
@ -160,7 +162,7 @@ class LIRGeneratorShared : public MInstructionVisitorWithDefaults
|
|||
return tmp;
|
||||
}
|
||||
|
||||
LRecoverInfo *buildRecover(MResumePoint *rp);
|
||||
LRecoverInfo *getRecoverInfo(MResumePoint *rp);
|
||||
LSnapshot *buildSnapshot(LInstruction *ins, MResumePoint *rp, BailoutKind kind);
|
||||
bool assignPostSnapshot(MInstruction *mir, LInstruction *ins);
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче