mirror of
https://gitlab.winehq.org/wine/wine-gecko.git
synced 2024-09-13 09:24:08 -07:00
Bug 1041868 - Add #ifdef JS_IONs to fix --disable-ion bustage (r=me)
--HG-- extra : rebase_source : e036a4cfddf84f746d77778881ced8d4f0ef4aa8
This commit is contained in:
parent
d5a64a8683
commit
1325c40e0c
@ -1681,8 +1681,6 @@ jit::JitActivation::markRematerializedFrames(JSTracer *trc)
|
||||
RematerializedFrame::MarkInVector(trc, e.front().value());
|
||||
}
|
||||
|
||||
#endif // JS_ION
|
||||
|
||||
AsmJSActivation::AsmJSActivation(JSContext *cx, AsmJSModule &module)
|
||||
: Activation(cx, AsmJS),
|
||||
module_(module),
|
||||
@ -1729,6 +1727,8 @@ AsmJSActivation::~AsmJSActivation()
|
||||
cx->mainThread().asmJSActivationStack_ = prevAsmJS_;
|
||||
}
|
||||
|
||||
#endif // JS_ION
|
||||
|
||||
InterpreterFrameIterator &
|
||||
InterpreterFrameIterator::operator++()
|
||||
{
|
||||
@ -1782,31 +1782,44 @@ ActivationIterator::settle()
|
||||
JS::ProfilingFrameIterator::ProfilingFrameIterator(JSRuntime *rt, const RegisterState &state)
|
||||
: activation_(rt->mainThread.asmJSActivationStack())
|
||||
{
|
||||
#ifdef JS_ION
|
||||
if (!activation_)
|
||||
return;
|
||||
|
||||
static_assert(sizeof(AsmJSProfilingFrameIterator) <= StorageSpace, "Need to increase storage");
|
||||
new (storage_.addr()) AsmJSProfilingFrameIterator(*activation_, state);
|
||||
settle();
|
||||
#else
|
||||
JS_ASSERT(!activation_);
|
||||
#endif
|
||||
}
|
||||
|
||||
JS::ProfilingFrameIterator::~ProfilingFrameIterator()
|
||||
{
|
||||
#ifdef JS_ION
|
||||
if (!done())
|
||||
iter().~AsmJSProfilingFrameIterator();
|
||||
#else
|
||||
JS_ASSERT(done());
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
JS::ProfilingFrameIterator::operator++()
|
||||
{
|
||||
#ifdef JS_ION
|
||||
JS_ASSERT(!done());
|
||||
++iter();
|
||||
settle();
|
||||
#else
|
||||
MOZ_CRASH("Shouldn't have any frames");
|
||||
#endif
|
||||
}
|
||||
|
||||
void
|
||||
JS::ProfilingFrameIterator::settle()
|
||||
{
|
||||
#ifdef JS_ION
|
||||
while (iter().done()) {
|
||||
iter().~AsmJSProfilingFrameIterator();
|
||||
activation_ = activation_->prevAsmJS();
|
||||
@ -1814,32 +1827,51 @@ JS::ProfilingFrameIterator::settle()
|
||||
return;
|
||||
new (storage_.addr()) AsmJSProfilingFrameIterator(*activation_);
|
||||
}
|
||||
#else
|
||||
MOZ_CRASH("Shouldn't have any frames");
|
||||
#endif
|
||||
}
|
||||
|
||||
JS::ProfilingFrameIterator::Kind
|
||||
JS::ProfilingFrameIterator::kind() const
|
||||
{
|
||||
#ifdef JS_ION
|
||||
return iter().kind();
|
||||
#else
|
||||
MOZ_CRASH("Shouldn't have any frames");
|
||||
#endif
|
||||
}
|
||||
|
||||
JSAtom *
|
||||
JS::ProfilingFrameIterator::functionDisplayAtom() const
|
||||
{
|
||||
#ifdef JS_ION
|
||||
JS_ASSERT(kind() == Function);
|
||||
return iter().functionDisplayAtom();
|
||||
#else
|
||||
MOZ_CRASH("Shouldn't have any frames");
|
||||
#endif
|
||||
}
|
||||
|
||||
const char *
|
||||
JS::ProfilingFrameIterator::functionFilename() const
|
||||
{
|
||||
#ifdef JS_ION
|
||||
JS_ASSERT(kind() == Function);
|
||||
return iter().functionFilename();
|
||||
#else
|
||||
MOZ_CRASH("Shouldn't have any frames");
|
||||
#endif
|
||||
}
|
||||
|
||||
const char *
|
||||
JS::ProfilingFrameIterator::nonFunctionDescription() const
|
||||
{
|
||||
#ifdef JS_ION
|
||||
JS_ASSERT(kind() != Function);
|
||||
return iter().nonFunctionDescription();
|
||||
#else
|
||||
MOZ_CRASH("Shouldn't have any frames");
|
||||
#endif
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user