Bug 1041868 - Add #ifdef JS_IONs to fix --disable-ion bustage (r=me)
authorLuke Wagner <luke@mozilla.com>
Tue, 22 Jul 2014 09:12:15 -0500
changeset 195499 f604cdbc6e85c1d7cf68d38592faf2e57495b0f1
parent 195498 a1f9c0d19457100bfeaac4e64e4d7dc0f0998854
child 195500 5c38e0a84b54ce795b11e9487636aa89db9891c9
push id27184
push userkwierso@gmail.com
push dateWed, 23 Jul 2014 00:39:18 +0000
treeherdermozilla-central@0ad20ad7b70a [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersme
bugs1041868
milestone34.0a1
first release with
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
last release without
nightly linux32
nightly linux64
nightly mac
nightly win32
nightly win64
Bug 1041868 - Add #ifdef JS_IONs to fix --disable-ion bustage (r=me)
js/src/vm/Stack.cpp
--- a/js/src/vm/Stack.cpp
+++ b/js/src/vm/Stack.cpp
@@ -1676,18 +1676,16 @@ void
 jit::JitActivation::markRematerializedFrames(JSTracer *trc)
 {
     if (!rematerializedFrames_)
         return;
     for (RematerializedFrameTable::Enum e(*rematerializedFrames_); !e.empty(); e.popFront())
         RematerializedFrame::MarkInVector(trc, e.front().value());
 }
 
-#endif // JS_ION
-
 AsmJSActivation::AsmJSActivation(JSContext *cx, AsmJSModule &module)
   : Activation(cx, AsmJS),
     module_(module),
     errorRejoinSP_(nullptr),
     profiler_(nullptr),
     resumePC_(nullptr),
     fp_(nullptr),
     exitReason_(AsmJSExit::None)
@@ -1724,16 +1722,18 @@ AsmJSActivation::~AsmJSActivation()
 
     JSContext *cx = cx_->asJSContext();
     JS_ASSERT(cx->mainThread().asmJSActivationStack_ == this);
 
     JSRuntime::AutoLockForInterrupt lock(cx->runtime());
     cx->mainThread().asmJSActivationStack_ = prevAsmJS_;
 }
 
+#endif // JS_ION
+
 InterpreterFrameIterator &
 InterpreterFrameIterator::operator++()
 {
     JS_ASSERT(!done());
     if (fp_ != activation_->entryFrame_) {
         pc_ = fp_->prevpc();
         sp_ = fp_->prevsp();
         fp_ = fp_->prev();
@@ -1777,69 +1777,101 @@ ActivationIterator::settle()
     // we don't iterate over an active jit activation.
     while (!done() && activation_->isJit() && !activation_->asJit()->isActive())
         activation_ = activation_->prev();
 }
 
 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();
         if (!activation_)
             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
 }