mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 989344 part 2 - Share LRecoverInfo between LSnapshots. r=jandem
This commit is contained in:
parent
00d83d3e90
commit
cf5ed52de1
@ -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);
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user