Bug 890784 (part 2) - Fix up #includes after the creation of the vm/Runtime module. r=wmccloskey.
authorNicholas Nethercote <nnethercote@mozilla.com>
Sun, 07 Jul 2013 23:23:59 -0700
changeset 138078 a8929e61d50a96daf7b08bab4d3f8de0158d3e7e
parent 138077 740cea2dbf4596548e85c2725ec4cfbb7e603b65
child 138079 ca55409207ab6398cc5f5559488bff7eeb7d4c7a
push id270
push userpvanderbeken@mozilla.com
push dateThu, 06 Mar 2014 09:24:21 +0000
reviewerswmccloskey
bugs890784
milestone25.0a1
Bug 890784 (part 2) - Fix up #includes after the creation of the vm/Runtime module. r=wmccloskey.
js/src/builtin/MapObject.h
js/src/gc/GCInternals.h
js/src/gc/Iteration.cpp
js/src/gc/Marking.h
js/src/gc/Memory.cpp
js/src/gc/Statistics.cpp
js/src/gc/Zone.cpp
js/src/jsanalyze.h
js/src/jscntxt.h
js/src/jsmemorymetrics.cpp
js/src/vm/RegExpObject.h
js/src/vm/Runtime.cpp
js/src/vm/ThreadPool.cpp
js/src/vm/Xdr.cpp
--- a/js/src/builtin/MapObject.h
+++ b/js/src/builtin/MapObject.h
@@ -3,19 +3,20 @@
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef builtin_MapObject_h
 #define builtin_MapObject_h
 
 #include "jsapi.h"
-#include "jscntxt.h"
 #include "jsobj.h"
 
+#include "vm/Runtime.h"
+
 namespace js {
 
 /*
  * Comparing two ropes for equality can fail. The js::HashTable template
  * requires infallible hash() and match() operations. Therefore we require
  * all values to be converted to hashable form before being used as a key
  * in a Map or Set object.
  *
--- a/js/src/gc/GCInternals.h
+++ b/js/src/gc/GCInternals.h
@@ -4,16 +4,18 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef gc_GCInternals_h
 #define gc_GCInternals_h
 
 #include "jsapi.h"
 
+#include "vm/Runtime.h"
+
 namespace js {
 namespace gc {
 
 void
 MarkRuntime(JSTracer *trc, bool useSavedRoots = false);
 
 void
 BufferGrayRoots(GCMarker *gcmarker);
--- a/js/src/gc/Iteration.cpp
+++ b/js/src/gc/Iteration.cpp
@@ -1,20 +1,20 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  * vim: set ts=8 sts=4 et sw=4 tw=99:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "jsapi.h"
-#include "jscntxt.h"
 #include "jsgc.h"
 
 #include "js/HashTable.h"
 #include "gc/GCInternals.h"
+#include "vm/Runtime.h"
 
 #include "jsgcinlines.h"
 
 using namespace js;
 using namespace js::gc;
 
 void
 js::TraceRuntime(JSTracer *trc)
--- a/js/src/gc/Marking.h
+++ b/js/src/gc/Marking.h
@@ -3,17 +3,16 @@
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef gc_Marking_h
 #define gc_Marking_h
 
 #include "jsgc.h"
-#include "jscntxt.h"
 #include "jslock.h"
 
 #include "gc/Barrier.h"
 #include "gc/Nursery.h"
 #include "js/TemplateLib.h"
 #include "ion/IonCode.h"
 
 extern "C" {
--- a/js/src/gc/Memory.cpp
+++ b/js/src/gc/Memory.cpp
@@ -1,19 +1,18 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  * vim: set ts=8 sts=4 et sw=4 tw=99:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "gc/Memory.h"
 
-#include "jscntxt.h"
-
 #include "js/HeapAPI.h"
+#include "vm/Runtime.h"
 
 using namespace js;
 using namespace js::gc;
 
 static bool
 DecommitEnabled(JSRuntime *rt)
 {
     return rt->gcSystemPageSize == ArenaSize;
--- a/js/src/gc/Statistics.cpp
+++ b/js/src/gc/Statistics.cpp
@@ -6,22 +6,22 @@
 
 #include "gc/Statistics.h"
 
 #include <stdio.h>
 #include <stdarg.h>
 
 #include "mozilla/PodOperations.h"
 
-#include "jscntxt.h"
 #include "jscrashreport.h"
 #include "jsprf.h"
 #include "jsutil.h"
 #include "prmjtime.h"
 #include "gc/Memory.h"
+#include "vm/Runtime.h"
 
 using namespace js;
 using namespace js::gcstats;
 
 using mozilla::PodArrayZero;
 
 /* Except for the first and last, slices of less than 42ms are not reported. */
 static const int64_t SLICE_MIN_REPORT_TIME = 42 * PRMJ_USEC_PER_MSEC;
--- a/js/src/gc/Zone.cpp
+++ b/js/src/gc/Zone.cpp
@@ -1,24 +1,23 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  * vim: set ts=8 sts=4 et sw=4 tw=99:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "jscntxt.h"
 #include "jsgc.h"
 
-#include "vm/Debugger.h"
-
 #ifdef JS_ION
 #include "ion/BaselineJIT.h"
 #include "ion/IonCompartment.h"
 #include "ion/Ion.h"
 #endif
+#include "vm/Debugger.h"
+#include "vm/Runtime.h"
 
 #include "jsgcinlines.h"
 
 using namespace js;
 using namespace js::gc;
 
 JS::Zone::Zone(JSRuntime *rt)
   : rt(rt),
--- a/js/src/jsanalyze.h
+++ b/js/src/jsanalyze.h
@@ -7,20 +7,21 @@
 /* Definitions for javascript analysis. */
 
 #ifndef jsanalyze_h
 #define jsanalyze_h
 
 #include "mozilla/PodOperations.h"
 
 #include "jscompartment.h"
-#include "jscntxt.h"
 #include "jsinfer.h"
 #include "jsscript.h"
 
+#include "vm/Runtime.h"
+
 class JSScript;
 
 namespace js {
 namespace analyze {
 
 /*
  * There are three analyses we can perform on a JSScript, outlined below.
  * The results of all three are stored in ScriptAnalysis, but the analyses
--- a/js/src/jscntxt.h
+++ b/js/src/jscntxt.h
@@ -6,41 +6,27 @@
 
 /* JS execution context. */
 
 #ifndef jscntxt_h
 #define jscntxt_h
 
 #include "mozilla/LinkedList.h"
 #include "mozilla/MemoryReporting.h"
-#include "mozilla/PodOperations.h"
 
 #include <string.h>
-#include <setjmp.h>
 
 #include "jsapi.h"
 #include "jsfriendapi.h"
 #include "jsprvtd.h"
-#include "jsatom.h"
-#include "jsclist.h"
-#include "jsgc.h"
 
-#include "ds/FixedSizeHash.h"
-#include "ds/LifoAlloc.h"
-#include "frontend/ParseMaps.h"
-#include "gc/Nursery.h"
-#include "gc/Statistics.h"
-#include "gc/StoreBuffer.h"
 #include "js/HashTable.h"
 #include "js/Vector.h"
-#include "vm/DateTime.h"
 #include "vm/Runtime.h"
-#include "vm/SPSProfiler.h"
 #include "vm/Stack.h"
-#include "vm/ThreadPool.h"
 
 #ifdef _MSC_VER
 #pragma warning(push)
 #pragma warning(disable:4100) /* Silence unreferenced formal parameter warnings */
 #pragma warning(push)
 #pragma warning(disable:4355) /* Silence warning about "this" used in base member initializer list */
 #endif
 
--- a/js/src/jsmemorymetrics.cpp
+++ b/js/src/jsmemorymetrics.cpp
@@ -4,24 +4,24 @@
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "js/MemoryMetrics.h"
 
 #include "mozilla/DebugOnly.h"
 
 #include "jsapi.h"
-#include "jscntxt.h"
 #include "jscompartment.h"
 #include "jsgc.h"
 #include "jsobj.h"
 #include "jsscript.h"
 
 #include "ion/BaselineJIT.h"
 #include "ion/Ion.h"
+#include "vm/Runtime.h"
 #include "vm/Shape.h"
 
 #include "jsobjinlines.h"
 
 using mozilla::DebugOnly;
 
 using namespace js;
 
--- a/js/src/vm/RegExpObject.h
+++ b/js/src/vm/RegExpObject.h
@@ -13,17 +13,17 @@
 #include <stddef.h>
 #include "jscntxt.h"
 #include "jsobj.h"
 
 #include "gc/Barrier.h"
 #include "gc/Marking.h"
 #include "js/TemplateLib.h"
 #include "vm/MatchPairs.h"
-
+#include "vm/Runtime.h"
 #include "yarr/MatchResult.h"
 #include "yarr/Yarr.h"
 #if ENABLE_YARR_JIT
 #include "yarr/YarrJIT.h"
 #endif
 #include "yarr/YarrSyntaxChecker.h"
 
 /*
--- a/js/src/vm/Runtime.cpp
+++ b/js/src/vm/Runtime.cpp
@@ -2,51 +2,31 @@
  * vim: set ts=8 sts=4 et sw=4 tw=99:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "vm/Runtime.h"
 
 #include <locale.h>
-#include <stdarg.h>
 #include <string.h>
 
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/Util.h"
 
-#include "jstypes.h"
-#include "jsprf.h"
 #include "jsatom.h"
-#include "jscompartment.h"
-#include "jsdbgapi.h"
-#include "jsexn.h"
-#include "jsfun.h"
 #include "jsgc.h"
-#include "jsiter.h"
 #include "jsmath.h"
 #include "jsobj.h"
-#include "jsopcode.h"
-#include "jspubtd.h"
 #include "jsscript.h"
-#include "jsstr.h"
-#include "jsworkers.h"
-#ifdef JS_ION
-#include "ion/Ion.h"
-#endif
 
-#include "gc/Marking.h"
-#include "js/CharacterEncoding.h"
 #include "js/MemoryMetrics.h"
-#include "vm/Shape.h"
 #include "yarr/BumpPointerAllocator.h"
 
-#include "jsobjinlines.h"
-
-#include "vm/Stack-inl.h"
+#include "jsgcinlines.h"
 
 using namespace js;
 using namespace js::gc;
 
 using mozilla::PodZero;
 
 void
 NewObjectCache::clearNurseryObjects(JSRuntime *rt)
--- a/js/src/vm/ThreadPool.cpp
+++ b/js/src/vm/ThreadPool.cpp
@@ -1,18 +1,18 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  * vim: set ts=8 sts=4 et sw=4 tw=99:
  * This Source Code Form is subject to the terms of the Mozilla Public
  * License, v. 2.0. If a copy of the MPL was not distributed with this
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
-#include "jscntxt.h"
 #include "jslock.h"
 
 #include "vm/Monitor.h"
+#include "vm/Runtime.h"
 #include "vm/ThreadPool.h"
 
 #ifdef JS_THREADSAFE
 #  include "prthread.h"
 #endif
 
 using namespace js;
 
--- a/js/src/vm/Xdr.cpp
+++ b/js/src/vm/Xdr.cpp
@@ -5,20 +5,20 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #include "vm/Xdr.h"
 
 #include <string.h>
 
 #include "jsprf.h"
 #include "jsapi.h"
-#include "jscntxt.h"
 #include "jsscript.h"
 
 #include "vm/Debugger.h"
+#include "vm/Runtime.h"
 
 #include "jsscriptinlines.h"
 
 using namespace js;
 
 void
 XDRBuffer::freeBuffer()
 {