mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 998490 - OdinMonkey: add operator-> to ActivationIterator (r=jandem)
--HG-- extra : rebase_source : 0ccecece1d8366c656b858bf2ec9e3beec6d1b54
This commit is contained in:
parent
0e10a5f610
commit
e6d392e893
@ -77,7 +77,7 @@ jit::Bailout(BailoutStack *sp, BaselineBailoutInfo **bailoutInfo)
|
||||
cx->mainThread().ionTop = nullptr;
|
||||
JitActivationIterator jitActivations(cx->runtime());
|
||||
IonBailoutIterator iter(jitActivations, sp);
|
||||
JitActivation *activation = jitActivations.activation()->asJit();
|
||||
JitActivation *activation = jitActivations->asJit();
|
||||
|
||||
TraceLogger *logger = TraceLoggerForMainThread(cx->runtime());
|
||||
TraceLogTimestamp(logger, TraceLogger::Bailout);
|
||||
@ -111,7 +111,7 @@ jit::InvalidationBailout(InvalidationBailoutStack *sp, size_t *frameSizeOut,
|
||||
cx->mainThread().ionTop = nullptr;
|
||||
JitActivationIterator jitActivations(cx->runtime());
|
||||
IonBailoutIterator iter(jitActivations, sp);
|
||||
JitActivation *activation = jitActivations.activation()->asJit();
|
||||
JitActivation *activation = jitActivations->asJit();
|
||||
|
||||
TraceLogger *logger = TraceLoggerForMainThread(cx->runtime());
|
||||
TraceLogTimestamp(logger, TraceLogger::Invalidation);
|
||||
@ -179,7 +179,7 @@ jit::ExceptionHandlerBailout(JSContext *cx, const InlineFrameIterator &frame,
|
||||
cx->mainThread().ionTop = nullptr;
|
||||
JitActivationIterator jitActivations(cx->runtime());
|
||||
IonBailoutIterator iter(jitActivations, frame.frame());
|
||||
JitActivation *activation = jitActivations.activation()->asJit();
|
||||
JitActivation *activation = jitActivations->asJit();
|
||||
|
||||
BaselineBailoutInfo *bailoutInfo = nullptr;
|
||||
uint32_t retval = BailoutIonToBaseline(cx, activation, iter, true, &bailoutInfo, &excInfo);
|
||||
|
@ -958,7 +958,7 @@ jit::MarkActiveBaselineScripts(Zone *zone)
|
||||
{
|
||||
JSRuntime *rt = zone->runtimeFromMainThread();
|
||||
for (JitActivationIterator iter(rt); !iter.done(); ++iter) {
|
||||
if (iter.activation()->compartment()->zone() == zone)
|
||||
if (iter->compartment()->zone() == zone)
|
||||
MarkActiveBaselineScripts(rt, iter);
|
||||
}
|
||||
}
|
||||
|
@ -2653,7 +2653,7 @@ jit::InvalidateAll(FreeOp *fop, Zone *zone)
|
||||
StopAllOffThreadCompilations(comp);
|
||||
|
||||
for (JitActivationIterator iter(fop->runtime()); !iter.done(); ++iter) {
|
||||
if (iter.activation()->compartment()->zone() == zone) {
|
||||
if (iter->compartment()->zone() == zone) {
|
||||
IonContext ictx(CompileRuntime::get(fop->runtime()));
|
||||
AutoFlushCache afc("InvalidateAll", fop->runtime()->jitRuntime());
|
||||
IonSpew(IonSpew_Invalidate, "Invalidating all frames for GC");
|
||||
@ -3074,7 +3074,7 @@ AutoDebugModeInvalidation::~AutoDebugModeInvalidation()
|
||||
jit::MarkActiveBaselineScripts(zone);
|
||||
|
||||
for (JitActivationIterator iter(rt); !iter.done(); ++iter) {
|
||||
JSCompartment *comp = iter.activation()->compartment();
|
||||
JSCompartment *comp = iter->compartment();
|
||||
if (comp_ == comp || zone_ == comp->zone()) {
|
||||
IonContext ictx(CompileRuntime::get(rt));
|
||||
AutoFlushCache afc("AutoDebugModeInvalidation", rt->jitRuntime());
|
||||
|
@ -92,7 +92,7 @@ JitFrameIterator::JitFrameIterator(const ActivationIterator &activations)
|
||||
returnAddressToFp_(nullptr),
|
||||
frameSize_(0),
|
||||
cachedSafepointIndex_(nullptr),
|
||||
activation_(activations.activation()->asJit()),
|
||||
activation_(activations->asJit()),
|
||||
mode_(SequentialExecution)
|
||||
{
|
||||
}
|
||||
@ -1174,7 +1174,7 @@ MarkRectifierFrame(JSTracer *trc, const JitFrameIterator &frame)
|
||||
static void
|
||||
MarkJitActivation(JSTracer *trc, const JitActivationIterator &activations)
|
||||
{
|
||||
JitActivation *activation = activations.activation()->asJit();
|
||||
JitActivation *activation = activations->asJit();
|
||||
|
||||
#ifdef CHECK_OSIPOINT_REGISTERS
|
||||
if (js_JitOptions.checkOsiPointRegisters) {
|
||||
|
@ -1206,8 +1206,8 @@ bool
|
||||
JSContext::currentlyRunning() const
|
||||
{
|
||||
for (ActivationIterator iter(runtime()); !iter.done(); ++iter) {
|
||||
if (iter.activation()->cx() == this) {
|
||||
if (iter.activation()->hasSavedFrameChain())
|
||||
if (iter->cx() == this) {
|
||||
if (iter->hasSavedFrameChain())
|
||||
return false;
|
||||
return true;
|
||||
}
|
||||
|
@ -681,7 +681,7 @@ bool
|
||||
JSCompartment::hasScriptsOnStack()
|
||||
{
|
||||
for (ActivationIterator iter(runtimeFromMainThread()); !iter.done(); ++iter) {
|
||||
if (iter.activation()->compartment() == this)
|
||||
if (iter->compartment() == this)
|
||||
return true;
|
||||
}
|
||||
|
||||
|
@ -4277,7 +4277,7 @@ AutoGCSlice::AutoGCSlice(JSRuntime *rt)
|
||||
* set it at the start of every phase.
|
||||
*/
|
||||
for (ActivationIterator iter(rt); !iter.done(); ++iter)
|
||||
iter.activation()->compartment()->zone()->active = true;
|
||||
iter->compartment()->zone()->active = true;
|
||||
|
||||
for (GCZonesIter zone(rt); !zone.done(); zone.next()) {
|
||||
/*
|
||||
|
@ -1182,8 +1182,8 @@ JSScript::initScriptCounts(JSContext *cx)
|
||||
|
||||
/* Enable interrupts in any interpreter frames running on this script. */
|
||||
for (ActivationIterator iter(cx->runtime()); !iter.done(); ++iter) {
|
||||
if (iter.activation()->isInterpreter())
|
||||
iter.activation()->asInterpreter()->enableInterruptsIfRunning(this);
|
||||
if (iter->isInterpreter())
|
||||
iter->asInterpreter()->enableInterruptsIfRunning(this);
|
||||
}
|
||||
|
||||
return true;
|
||||
@ -3150,8 +3150,8 @@ JSScript::ensureHasDebugScript(JSContext *cx)
|
||||
* debug state is destroyed.
|
||||
*/
|
||||
for (ActivationIterator iter(cx->runtime()); !iter.done(); ++iter) {
|
||||
if (iter.activation()->isInterpreter())
|
||||
iter.activation()->asInterpreter()->enableInterruptsIfRunning(this);
|
||||
if (iter->isInterpreter())
|
||||
iter->asInterpreter()->enableInterruptsIfRunning(this);
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -270,8 +270,8 @@ JS_SetInterrupt(JSRuntime *rt, JSInterruptHook hook, void *closure)
|
||||
rt->debugHooks.interruptHookData = closure;
|
||||
|
||||
for (ActivationIterator iter(rt); !iter.done(); ++iter) {
|
||||
if (iter.activation()->isInterpreter())
|
||||
iter.activation()->asInterpreter()->enableInterruptsUnconditionally();
|
||||
if (iter->isInterpreter())
|
||||
iter->asInterpreter()->enableInterruptsUnconditionally();
|
||||
}
|
||||
|
||||
return true;
|
||||
|
@ -767,7 +767,7 @@ FrameIter::operator++()
|
||||
|
||||
data_.contextOption_ = prevContextOption;
|
||||
data_.savedOption_ = prevSavedOption;
|
||||
data_.cx_ = data_.activations_.activation()->cx();
|
||||
data_.cx_ = data_.activations_->cx();
|
||||
break;
|
||||
}
|
||||
popInterpreterFrame();
|
||||
@ -820,7 +820,7 @@ FrameIter::compartment() const
|
||||
case INTERP:
|
||||
case JIT:
|
||||
case ASMJS:
|
||||
return data_.activations_.activation()->compartment();
|
||||
return data_.activations_->compartment();
|
||||
}
|
||||
MOZ_ASSUME_UNREACHABLE("Unexpected state");
|
||||
}
|
||||
@ -940,7 +940,7 @@ FrameIter::functionDisplayAtom() const
|
||||
return callee()->displayAtom();
|
||||
case ASMJS: {
|
||||
#ifdef JS_ION
|
||||
AsmJSActivation &act = *data_.activations_.activation()->asAsmJS();
|
||||
AsmJSActivation &act = *data_.activations_->asAsmJS();
|
||||
return act.module().exportedFunction(act.exportIndex()).name();
|
||||
#else
|
||||
break;
|
||||
@ -962,7 +962,7 @@ FrameIter::scriptSource() const
|
||||
return script()->scriptSource();
|
||||
case ASMJS:
|
||||
#ifdef JS_ION
|
||||
return data_.activations_.activation()->asAsmJS()->module().scriptSource();
|
||||
return data_.activations_->asAsmJS()->module().scriptSource();
|
||||
#else
|
||||
break;
|
||||
#endif
|
||||
@ -982,7 +982,7 @@ FrameIter::scriptFilename() const
|
||||
return script()->filename();
|
||||
case ASMJS:
|
||||
#ifdef JS_ION
|
||||
return data_.activations_.activation()->asAsmJS()->module().scriptSource()->filename();
|
||||
return data_.activations_->asAsmJS()->module().scriptSource()->filename();
|
||||
#else
|
||||
break;
|
||||
#endif
|
||||
@ -1002,7 +1002,7 @@ FrameIter::computeLine(uint32_t *column) const
|
||||
return PCToLineNumber(script(), pc(), column);
|
||||
case ASMJS: {
|
||||
#ifdef JS_ION
|
||||
AsmJSActivation &act = *data_.activations_.activation()->asAsmJS();
|
||||
AsmJSActivation &act = *data_.activations_->asAsmJS();
|
||||
AsmJSModule::ExportedFunction &func = act.module().exportedFunction(act.exportIndex());
|
||||
if (column)
|
||||
*column = func.column();
|
||||
@ -1027,7 +1027,7 @@ FrameIter::originPrincipals() const
|
||||
return script()->originPrincipals();
|
||||
case ASMJS: {
|
||||
#ifdef JS_ION
|
||||
return data_.activations_.activation()->asAsmJS()->module().scriptSource()->originPrincipals();
|
||||
return data_.activations_->asAsmJS()->module().scriptSource()->originPrincipals();
|
||||
#else
|
||||
break;
|
||||
#endif
|
||||
@ -1128,7 +1128,7 @@ FrameIter::updatePcQuadratic()
|
||||
break;
|
||||
case INTERP: {
|
||||
InterpreterFrame *frame = interpFrame();
|
||||
InterpreterActivation *activation = data_.activations_.activation()->asInterpreter();
|
||||
InterpreterActivation *activation = data_.activations_->asInterpreter();
|
||||
|
||||
// Look for the current frame.
|
||||
data_.interpFrames_ = InterpreterFrameIterator(activation);
|
||||
@ -1144,7 +1144,7 @@ FrameIter::updatePcQuadratic()
|
||||
#ifdef JS_ION
|
||||
if (data_.jitFrames_.isBaselineJS()) {
|
||||
jit::BaselineFrame *frame = data_.jitFrames_.baselineFrame();
|
||||
jit::JitActivation *activation = data_.activations_.activation()->asJit();
|
||||
jit::JitActivation *activation = data_.activations_->asJit();
|
||||
|
||||
// ActivationIterator::ionTop_ may be invalid, so create a new
|
||||
// activation iterator.
|
||||
|
@ -1304,6 +1304,9 @@ class ActivationIterator
|
||||
|
||||
ActivationIterator &operator++();
|
||||
|
||||
Activation *operator->() const {
|
||||
return activation_;
|
||||
}
|
||||
Activation *activation() const {
|
||||
return activation_;
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user