Bug 1070962 part 5 - rematerializeFrames no longer use IonBailoutIterator. r=jandem

This commit is contained in:
Nicolas B. Pierron 2014-10-13 17:34:01 +02:00
parent 236e251436
commit 603e0283f9
4 changed files with 13 additions and 34 deletions

View File

@ -148,13 +148,7 @@ class IonBailoutIterator : public JitFrameIterator
return JitFrameIterator::ionScript();
}
IonBailoutIterator &operator++() {
JitFrameIterator::operator++();
// Clear topIonScript_ now that we've advanced past it, so that
// snapshotOffset() and machineState() reflect the current script.
topIonScript_ = nullptr;
return *this;
}
IonBailoutIterator &operator++() MOZ_DELETE;
void dump() const;
};

View File

@ -544,9 +544,10 @@ jit::BailoutPar(BailoutStack *sp, uint8_t **entryFramePointer)
cx->perThreadData->jitTop = FAKE_JIT_TOP_FOR_BAILOUT;
JitActivationIterator jitActivations(cx->perThreadData);
IonBailoutIterator frameIter(jitActivations, sp);
IonBailoutIterator bailoutData(jitActivations, sp);
JitActivation::RegisterBailoutIterator registerIterator(*jitActivations->asJit(), &bailoutData);
JitFrameIterator frameIter(jitActivations);
SnapshotIterator snapIter(frameIter);
JitActivation::RegisterBailoutIterator registerIterator(*jitActivations->asJit(), &frameIter);
cx->bailoutRecord->setIonBailoutKind(snapIter.bailoutKind());
cx->bailoutRecord->rematerializeFrames(cx, frameIter);

View File

@ -1881,17 +1881,14 @@ ParallelBailoutRecord::reset()
cause = ParallelBailoutNone;
}
template <class T>
static void
RematerializeFramesWithIter(ForkJoinContext *cx, T &frameIter,
Vector<RematerializedFrame *> &frames)
void
ParallelBailoutRecord::rematerializeFrames(ForkJoinContext *cx, JitFrameIterator &frameIter)
{
// This function as well as |rematerializeFrames| methods below are
// infallible. These are only called when we are already erroring out. If
// we OOM here, free what we've allocated and return. Error reporting is
// then unable to give the user detailed stack information.
// This function is infallible. These are only called when we are already
// erroring out. If we OOM here, free what we've allocated and return. Error
// reporting is then unable to give the user detailed stack information.
MOZ_ASSERT(frames.empty());
MOZ_ASSERT(frames().empty());
for (; !frameIter.done(); ++frameIter) {
if (!frameIter.isIonJS())
@ -1904,33 +1901,21 @@ RematerializeFramesWithIter(ForkJoinContext *cx, T &frameIter,
inlineIter, inlineFrames))
{
RematerializedFrame::FreeInVector(inlineFrames);
RematerializedFrame::FreeInVector(frames);
RematerializedFrame::FreeInVector(frames());
return;
}
// Reverse the inline frames into the main vector.
while (!inlineFrames.empty()) {
if (!frames.append(inlineFrames.popCopy())) {
if (!frames().append(inlineFrames.popCopy())) {
RematerializedFrame::FreeInVector(inlineFrames);
RematerializedFrame::FreeInVector(frames);
RematerializedFrame::FreeInVector(frames());
return;
}
}
}
}
void
ParallelBailoutRecord::rematerializeFrames(ForkJoinContext *cx, JitFrameIterator &frameIter)
{
RematerializeFramesWithIter(cx, frameIter, frames());
}
void
ParallelBailoutRecord::rematerializeFrames(ForkJoinContext *cx, IonBailoutIterator &frameIter)
{
RematerializeFramesWithIter(cx, frameIter, frames());
}
//////////////////////////////////////////////////////////////////////////////
//

View File

@ -373,7 +373,6 @@ struct ParallelBailoutRecord
}
void rematerializeFrames(ForkJoinContext *cx, jit::JitFrameIterator &frameIter);
void rematerializeFrames(ForkJoinContext *cx, jit::IonBailoutIterator &frameIter);
};
class ForkJoinShared;