Bug 1488855 - Move InterpreterStack from JSContext to JSRuntime. r=jonco
authorDiego Pino Garcia <dpino@igalia.com>
Tue, 09 Oct 2018 03:26:00 +0300
changeset 496039 d49a5d674e007fc79beda9437889ca5a1eec4aa2
parent 495976 9293f334a9949164ac1b0dea5ad40eaeb44ef2da
child 496040 0bfaf23618510b770d86e35e449e9c13a9e9a63e
push id9984
push userffxbld-merge
push dateMon, 15 Oct 2018 21:07:35 +0000
treeherdermozilla-beta@183d27ea8570 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersjonco
bugs1488855
milestone64.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 1488855 - Move InterpreterStack from JSContext to JSRuntime. r=jonco
js/src/vm/JSContext.h
js/src/vm/Runtime.h
--- a/js/src/vm/JSContext.h
+++ b/js/src/vm/JSContext.h
@@ -439,23 +439,19 @@ struct JSContext : public JS::RootingCon
     }
 
 #ifdef DEBUG
     static size_t offsetOfInUnsafeCallWithABI() {
         return offsetof(JSContext, inUnsafeCallWithABI);
     }
 #endif
 
-  private:
-    /* Space for interpreter frames. */
-    js::ThreadData<js::InterpreterStack> interpreterStack_;
-
   public:
     js::InterpreterStack& interpreterStack() {
-        return interpreterStack_.ref();
+        return runtime()->interpreterStack();
     }
 
     /* Base address of the native stack for the current thread. */
     const uintptr_t     nativeStackBase;
 
     /* The native stack size limit that runtime should not exceed. */
     js::ThreadData<size_t> nativeStackQuota[JS::StackKindCount];
 
--- a/js/src/vm/Runtime.h
+++ b/js/src/vm/Runtime.h
@@ -225,17 +225,24 @@ class AutoLockScriptData;
 struct JSRuntime : public js::MallocProvider<JSRuntime>
 {
   private:
     friend class js::Activation;
     friend class js::ActivationIterator;
     friend class js::jit::JitActivation;
     friend class js::jit::CompileRuntime;
 
+    /* Space for interpreter frames. */
+    js::MainThreadData<js::InterpreterStack> interpreterStack_;
+
   public:
+    js::InterpreterStack& interpreterStack() {
+        return interpreterStack_.ref();
+    }
+
     /*
      * If non-null, another runtime guaranteed to outlive this one and whose
      * permanent data may be used by this one where possible.
      */
     JSRuntime* const parentRuntime;
 
 #ifdef DEBUG
     /* The number of child runtimes that have this runtime as their parent. */