Bug 1125841 - remove PerThreadData variants of activation iterator constructors. r=jandem

--HG--
extra : amend_source : a92af13f1227eb361bbf0f529ada82a67890e268
This commit is contained in:
Lars T Hansen 2015-01-27 07:58:39 +01:00
Родитель 75230f87bb
Коммит 94554c39eb
7 изменённых файлов: 15 добавлений и 27 удалений

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

@ -859,7 +859,7 @@ js::Nursery::collect(JSRuntime *rt, JS::gcreason::Reason reason, TypeObjectList
// Update any slot or element pointers whose destination has been tenured.
TIME_START(updateJitActivations);
js::jit::UpdateJitActivationsForMinorGC(&rt->mainThread, &trc);
js::jit::UpdateJitActivationsForMinorGC(rt, &trc);
forwardedBuffers.finish();
TIME_END(updateJitActivations);

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

@ -509,9 +509,9 @@ js::gc::GCRuntime::markRuntime(JSTracer *trc,
c->lazyArrayBuffers->trace(trc);
}
MarkInterpreterActivations(&rt->mainThread, trc);
MarkInterpreterActivations(rt, trc);
jit::MarkJitActivations(&rt->mainThread, trc);
jit::MarkJitActivations(rt, trc);
if (!isHeapMinorCollecting()) {
gcstats::AutoPhase ap(stats, gcstats::PHASE_MARK_EMBEDDING);

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

@ -1442,9 +1442,9 @@ MarkJitActivation(JSTracer *trc, const JitActivationIterator &activations)
}
void
MarkJitActivations(PerThreadData *ptd, JSTracer *trc)
MarkJitActivations(JSRuntime *rt, JSTracer *trc)
{
for (JitActivationIterator activations(ptd); !activations.done(); ++activations)
for (JitActivationIterator activations(rt); !activations.done(); ++activations)
MarkJitActivation(trc, activations);
}
@ -1460,10 +1460,10 @@ TopmostIonActivationCompartment(JSRuntime *rt)
return nullptr;
}
void UpdateJitActivationsForMinorGC(PerThreadData *ptd, JSTracer *trc)
void UpdateJitActivationsForMinorGC(JSRuntime *rt, JSTracer *trc)
{
MOZ_ASSERT(trc->runtime()->isHeapMinorCollecting());
for (JitActivationIterator activations(ptd); !activations.done(); ++activations) {
for (JitActivationIterator activations(rt); !activations.done(); ++activations) {
for (JitFrameIterator frames(activations); !frames.done(); ++frames) {
if (frames.type() == JitFrame_IonJS)
UpdateIonJSFrameForMinorGC(trc, frames);

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

@ -273,13 +273,13 @@ void HandleException(ResumeFromException *rfe);
void EnsureExitFrame(CommonFrameLayout *frame);
void MarkJitActivations(PerThreadData *ptd, JSTracer *trc);
void MarkJitActivations(JSRuntime *rt, JSTracer *trc);
void MarkIonCompilerRoots(JSTracer *trc);
JSCompartment *
TopmostIonActivationCompartment(JSRuntime *rt);
void UpdateJitActivationsForMinorGC(PerThreadData *ptd, JSTracer *trc);
void UpdateJitActivationsForMinorGC(JSRuntime *rt, JSTracer *trc);
static inline uint32_t
MakeFrameDescriptor(uint32_t frameSize, FrameType type)

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

@ -5419,7 +5419,7 @@ UpdateFrameIterPc(FrameIter &iter)
jit::JitFrameLayout *jsFrame = (jit::JitFrameLayout *)frame->top();
jit::JitActivation *activation = iter.activation()->asJit();
ActivationIterator activationIter(activation->cx()->perThreadData);
ActivationIterator activationIter(activation->cx()->runtime());
while (activationIter.activation() != activation)
++activationIter;

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

@ -405,9 +405,9 @@ MarkInterpreterActivation(JSTracer *trc, InterpreterActivation *act)
}
void
js::MarkInterpreterActivations(PerThreadData *ptd, JSTracer *trc)
js::MarkInterpreterActivations(JSRuntime *rt, JSTracer *trc)
{
for (ActivationIterator iter(ptd); !iter.done(); ++iter) {
for (ActivationIterator iter(rt); !iter.done(); ++iter) {
Activation *act = iter.activation();
if (act->isInterpreter())
MarkInterpreterActivation(trc, act->asInterpreter());
@ -589,7 +589,7 @@ FrameIter::Data::Data(JSContext *cx, SavedOption savedOption,
principals_(principals),
pc_(nullptr),
interpFrames_(nullptr),
activations_(cx->perThreadData),
activations_(cx->runtime()),
jitFrames_(),
ionInlineFrameNo_(0),
asmJSFrames_()
@ -1040,7 +1040,7 @@ FrameIter::updatePcQuadratic()
// ActivationIterator::jitTop_ may be invalid, so create a new
// activation iterator.
data_.activations_ = ActivationIterator(data_.cx_->perThreadData);
data_.activations_ = ActivationIterator(data_.cx_->runtime());
while (data_.activations_.activation() != activation)
++data_.activations_;
@ -1694,11 +1694,6 @@ ActivationIterator::ActivationIterator(JSRuntime *rt)
settle();
}
ActivationIterator::ActivationIterator(PerThreadData *perThreadData)
: ActivationIterator(perThreadData->runtimeFromMainThread())
{
}
ActivationIterator &
ActivationIterator::operator++()
{

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

@ -1001,7 +1001,7 @@ class InterpreterStack
}
};
void MarkInterpreterActivations(PerThreadData *ptd, JSTracer *trc);
void MarkInterpreterActivations(JSRuntime *rt, JSTracer *trc);
/*****************************************************************************/
@ -1220,7 +1220,6 @@ class ActivationIterator
public:
explicit ActivationIterator(JSRuntime *rt);
explicit ActivationIterator(PerThreadData *perThreadData);
ActivationIterator &operator++();
@ -1415,12 +1414,6 @@ class JitActivationIterator : public ActivationIterator
settle();
}
explicit JitActivationIterator(PerThreadData *perThreadData)
: ActivationIterator(perThreadData)
{
settle();
}
JitActivationIterator &operator++() {
ActivationIterator::operator++();
settle();