Bug 915482 (part 2) - Minimize gc/Barrier-inl.h includes. r=terrence.
authorNicholas Nethercote <nnethercote@mozilla.com>
Wed, 11 Sep 2013 16:52:30 -0700
changeset 159734 e621399eb90f077cf46b5f2dd6071267b8128d75
parent 159733 aca02ab3f2d39c16cf36fd5b7b77edd884270998
child 159735 03299b97544330eaabd21972fc85dfb82f7f1729
push id2961
push userlsblakk@mozilla.com
push dateMon, 28 Oct 2013 21:59:28 +0000
treeherdermozilla-beta@73ef4f13486f [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersterrence
bugs915482
milestone26.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 915482 (part 2) - Minimize gc/Barrier-inl.h includes. r=terrence.
js/src/gc/Barrier-inl.h
js/src/jsapi-tests/testGCFinalizeCallback.cpp
js/src/jscntxtinlines.h
js/src/jscompartment.cpp
js/src/jscompartmentinlines.h
js/src/jsobjinlines.h
js/src/jswatchpoint.cpp
js/src/jsweakmap.cpp
js/src/vm/Interpreter-inl.h
js/src/vm/ObjectImpl-inl.h
js/src/vm/ScopeObject.cpp
--- a/js/src/gc/Barrier-inl.h
+++ b/js/src/gc/Barrier-inl.h
@@ -4,23 +4,16 @@
  * 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_Barrier_inl_h
 #define gc_Barrier_inl_h
 
 #include "gc/Barrier.h"
 
-#include "jscompartment.h"
-
-#include "gc/Marking.h"
-#include "gc/StoreBuffer.h"
-
-#include "vm/String-inl.h"
-
 namespace js {
 
 inline const Value &
 ReadBarrieredValue::get() const
 {
     if (value.isObject())
         JSObject::readBarrier(&value.toObject());
     else if (value.isString())
--- a/js/src/jsapi-tests/testGCFinalizeCallback.cpp
+++ b/js/src/jsapi-tests/testGCFinalizeCallback.cpp
@@ -4,18 +4,16 @@
 
 #include <stdarg.h>
 
 #include "jscntxt.h"
 #include "jsfriendapi.h"
 
 #include "jsapi-tests/tests.h"
 
-#include "vm/ObjectImpl-inl.h"
-
 const unsigned BufferSize = 20;
 static unsigned FinalizeCalls = 0;
 static JSFinalizeStatus StatusBuffer[BufferSize];
 static bool IsCompartmentGCBuffer[BufferSize];
 
 static void
 FinalizeCallback(JSFreeOp *fop, JSFinalizeStatus status, bool isCompartmentGC)
 {
--- a/js/src/jscntxtinlines.h
+++ b/js/src/jscntxtinlines.h
@@ -3,28 +3,27 @@
  * 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 jscntxtinlines_h
 #define jscntxtinlines_h
 
 #include "jscntxt.h"
+#include "jscompartment.h"
 
 #include "jsiter.h"
 #include "jsworkers.h"
 
 #include "builtin/Object.h"
 #include "jit/IonFrames.h"
 #include "vm/ForkJoin.h"
 #include "vm/Interpreter.h"
 #include "vm/ProxyObject.h"
 
-#include "gc/Barrier-inl.h"
-
 namespace js {
 
 #ifdef JS_CRASH_DIAGNOSTICS
 class CompartmentChecker
 {
     JSCompartment *compartment;
 
   public:
--- a/js/src/jscompartment.cpp
+++ b/js/src/jscompartment.cpp
@@ -24,18 +24,16 @@
 #include "vm/StopIterationObject.h"
 #include "vm/WrapperObject.h"
 
 #include "jsatominlines.h"
 #include "jsfuninlines.h"
 #include "jsgcinlines.h"
 #include "jsinferinlines.h"
 
-#include "gc/Barrier-inl.h"
-
 using namespace js;
 using namespace js::gc;
 
 using mozilla::DebugOnly;
 
 JSCompartment::JSCompartment(Zone *zone, const JS::CompartmentOptions &options = JS::CompartmentOptions())
   : options_(options),
     zone_(zone),
--- a/js/src/jscompartmentinlines.h
+++ b/js/src/jscompartmentinlines.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 jscompartmentinlines_h
 #define jscompartmentinlines_h
 
 #include "jscompartment.h"
 
+#include "gc/Barrier-inl.h"
+
 inline void
 JSCompartment::initGlobal(js::GlobalObject &global)
 {
     JS_ASSERT(global.compartment() == this);
     JS_ASSERT(!global_);
     global_ = &global;
 }
 
--- a/js/src/jsobjinlines.h
+++ b/js/src/jsobjinlines.h
@@ -13,16 +13,17 @@
 #include "vm/DateObject.h"
 #include "vm/NumberObject.h"
 #include "vm/Probes.h"
 #include "vm/ScopeObject.h"
 #include "vm/StringObject.h"
 
 #include "jsatominlines.h"
 #include "jscompartmentinlines.h"
+#include "jsgcinlines.h"
 #include "jsinferinlines.h"
 
 #include "vm/Shape-inl.h"
 
 /* static */ inline bool
 JSObject::setGenericAttributes(JSContext *cx, js::HandleObject obj,
                                js::HandleId id, unsigned *attrsp)
 {
--- a/js/src/jswatchpoint.cpp
+++ b/js/src/jswatchpoint.cpp
@@ -9,18 +9,16 @@
 #include "jsatom.h"
 #include "jscompartment.h"
 #include "jsfriendapi.h"
 
 #include "gc/Marking.h"
 
 #include "jsgcinlines.h"
 
-#include "gc/Barrier-inl.h"
-
 using namespace js;
 using namespace js::gc;
 
 inline HashNumber
 DefaultHasher<WatchKey>::hash(const Lookup &key)
 {
     return DefaultHasher<JSObject *>::hash(key.object.get()) ^ HashId(key.id.get());
 }
--- a/js/src/jsweakmap.cpp
+++ b/js/src/jsweakmap.cpp
@@ -14,18 +14,16 @@
 #include "jsobj.h"
 #include "jswrapper.h"
 
 #include "vm/GlobalObject.h"
 #include "vm/WeakMapObject.h"
 
 #include "jsobjinlines.h"
 
-#include "gc/Barrier-inl.h"
-
 using namespace js;
 
 WeakMapBase::WeakMapBase(JSObject *memOf, JSCompartment *c)
   : memberOf(memOf),
     compartment(c),
     next(WeakMapNotInList)
 {
     JS_ASSERT_IF(memberOf, memberOf->compartment() == c);
--- a/js/src/vm/Interpreter-inl.h
+++ b/js/src/vm/Interpreter-inl.h
@@ -19,16 +19,17 @@
 #include "vm/ArgumentsObject.h"
 #include "vm/ForkJoin.h"
 
 #include "jsatominlines.h"
 #include "jsinferinlines.h"
 #include "jsobjinlines.h"
 
 #include "vm/Stack-inl.h"
+#include "vm/String-inl.h"
 
 namespace js {
 
 inline bool
 ComputeThis(JSContext *cx, AbstractFramePtr frame)
 {
     JS_ASSERT_IF(frame.isStackFrame(), !frame.asStackFrame()->runningInJit());
     if (frame.thisValue().isObject())
--- a/js/src/vm/ObjectImpl-inl.h
+++ b/js/src/vm/ObjectImpl-inl.h
@@ -4,22 +4,21 @@
  * 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 vm_ObjectImpl_inl_h
 #define vm_ObjectImpl_inl_h
 
 #include "vm/ObjectImpl.h"
 
+#include "jscntxt.h"
 #include "jsproxy.h"
 
 #include "vm/ProxyObject.h"
 
-#include "gc/Barrier-inl.h"
-
 /* static */ inline bool
 js::ObjectImpl::isExtensible(ExclusiveContext *cx, js::Handle<ObjectImpl*> obj, bool *extensible)
 {
     if (obj->asObjectPtr()->is<ProxyObject>()) {
         if (!cx->shouldBeJSContext())
             return false;
         HandleObject h =
             HandleObject::fromMarkedLocation(reinterpret_cast<JSObject* const*>(obj.address()));
--- a/js/src/vm/ScopeObject.cpp
+++ b/js/src/vm/ScopeObject.cpp
@@ -16,17 +16,16 @@
 #include "vm/ProxyObject.h"
 #include "vm/Shape.h"
 #include "vm/Xdr.h"
 
 #include "jsatominlines.h"
 #include "jsobjinlines.h"
 #include "jsscriptinlines.h"
 
-#include "gc/Barrier-inl.h"
 #include "vm/Stack-inl.h"
 
 using namespace js;
 using namespace js::types;
 
 using mozilla::PodZero;
 
 typedef Rooted<ArgumentsObject *> RootedArgumentsObject;