Bug 911043 (part 2) - Remove unnecessary jsapi.h includes in SpiderMonkey. r=luke.
authorNicholas Nethercote <nnethercote@mozilla.com>
Sun, 01 Sep 2013 22:03:30 -0700
changeset 153210 0dce2a6b6e3d85e1889c4b2134e76b2d6f4ccfce
parent 153209 3e60625da760fb50544b2489b23524366b5df465
child 153211 afcc9a2bd94c23b8a159717f00785b87cdfb2890
push id4254
push userakeybl@mozilla.com
push dateTue, 17 Sep 2013 14:18:33 +0000
treeherdermozilla-aurora@9edd56e694b0 [default view] [failures only]
perfherder[talos] [build metrics] [platform microbench] (compared to previous push)
reviewersluke
bugs911043
milestone26.0a1
Bug 911043 (part 2) - Remove unnecessary jsapi.h includes in SpiderMonkey. r=luke.
js/src/builtin/BinaryData.h
js/src/builtin/Eval.h
js/src/builtin/Intl.h
js/src/builtin/TestingFunctions.h
js/src/ds/IdValuePair.h
js/src/frontend/BytecodeCompiler.h
js/src/gc/Statistics.h
js/src/jit/AsmJS.h
js/src/jit/AsmJSLink.h
js/src/jit/C1Spewer.h
js/src/jsapi.h
js/src/jsmath.h
js/src/jsnum.h
js/src/jspropertytree.cpp
js/src/jsstr.h
js/src/jswatchpoint.h
js/src/perf/jsperf.h
js/src/vm/Xdr.h
--- a/js/src/builtin/BinaryData.h
+++ b/js/src/builtin/BinaryData.h
@@ -2,17 +2,16 @@
  * 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/. */
 
 #ifndef builtin_BinaryData_h
 #define builtin_BinaryData_h
 
-#include "jsapi.h"
 #include "jsobj.h"
 
 #include "builtin/TypeRepresentation.h"
 
 namespace js {
 
 // Slots common to all type descriptors:
 enum TypeCommonSlots {
--- a/js/src/builtin/Eval.h
+++ b/js/src/builtin/Eval.h
@@ -2,17 +2,16 @@
  * 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/. */
 
 #ifndef builtin_Eval_h
 #define builtin_Eval_h
 
-#include "jsapi.h"
 #include "jsbytecode.h"
 #include "NamespaceImports.h"
 
 namespace js {
 
 // The C++ native for 'eval' (ES5 15.1.2.1). The function is named "indirect
 // eval" because "direct eval" calls (as defined by the spec) will emit
 // JSOP_EVAL which in turn calls DirectEval. Thus, even though IndirectEval is
--- a/js/src/builtin/Intl.h
+++ b/js/src/builtin/Intl.h
@@ -2,17 +2,16 @@
  * 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/. */
 
 #ifndef builtin_Intl_h
 #define builtin_Intl_h
 
-#include "jsapi.h"
 #include "NamespaceImports.h"
 
 #include "js/RootingAPI.h"
 
 /*
  * The Intl module specified by standard ECMA-402,
  * ECMAScript Internationalization API Specification.
  */
--- a/js/src/builtin/TestingFunctions.h
+++ b/js/src/builtin/TestingFunctions.h
@@ -2,25 +2,24 @@
  * 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/. */
 
 #ifndef builtin_TestingFunctions_h
 #define builtin_TestingFunctions_h
 
-#include "jsapi.h"
 #include "NamespaceImports.h"
 
 namespace js {
 
 bool
 DefineTestingFunctions(JSContext *cx, HandleObject obj);
 
 bool
-testingFunc_inParallelSection(JSContext *cx, unsigned argc, jsval *vp);
+testingFunc_inParallelSection(JSContext *cx, unsigned argc, Value *vp);
 
 bool
-testingFunc_bailout(JSContext *cx, unsigned argc, jsval *vp);
+testingFunc_bailout(JSContext *cx, unsigned argc, Value *vp);
 
 } /* namespace js */
 
 #endif /* builtin_TestingFunctions_h */
--- a/js/src/ds/IdValuePair.h
+++ b/js/src/ds/IdValuePair.h
@@ -2,17 +2,16 @@
  * 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/. */
 
 #ifndef ds_IdValuePair_h
 #define ds_IdValuePair_h
 
-#include "jsapi.h"
 #include "NamespaceImports.h"
 
 namespace js {
 
 struct IdValuePair
 {
     jsid id;
     Value value;
--- a/js/src/frontend/BytecodeCompiler.h
+++ b/js/src/frontend/BytecodeCompiler.h
@@ -2,17 +2,16 @@
  * 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/. */
 
 #ifndef frontend_BytecodeCompiler_h
 #define frontend_BytecodeCompiler_h
 
-#include "jsapi.h"
 #include "NamespaceImports.h"
 
 class JSLinearString;
 
 namespace js {
 
 class AutoNameVector;
 class LazyScript;
--- a/js/src/gc/Statistics.h
+++ b/js/src/gc/Statistics.h
@@ -5,20 +5,21 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef gc_Statistics_h
 #define gc_Statistics_h
 
 #include "mozilla/DebugOnly.h"
 #include "mozilla/PodOperations.h"
 
-#include "jsapi.h"
+#include "jsalloc.h"
 #include "jspubtd.h"
 
 #include "js/GCAPI.h"
+#include "js/Vector.h"
 
 struct JSCompartment;
 
 namespace js {
 namespace gcstats {
 
 enum Phase {
     PHASE_GC_BEGIN,
--- a/js/src/jit/AsmJS.h
+++ b/js/src/jit/AsmJS.h
@@ -2,17 +2,19 @@
  * 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/. */
 
 #ifndef jit_AsmJS_h
 #define jit_AsmJS_h
 
-#include "jsapi.h"
+#include <stddef.h>
+
+#include "js/TypeDecls.h"
 
 namespace js {
 
 class ExclusiveContext;
 class AsmJSModule;
 class SPSProfiler;
 namespace frontend {
     template <typename ParseHandler> struct Parser;
--- a/js/src/jit/AsmJSLink.h
+++ b/js/src/jit/AsmJSLink.h
@@ -2,17 +2,16 @@
  * 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/. */
 
 #ifndef jit_AsmJSLink_h
 #define jit_AsmJSLink_h
 
-#include "jsapi.h"
 #include "NamespaceImports.h"
 
 namespace js {
 
 #ifdef JS_ION
 
 // Create a new JSFunction to replace originalFun as the representation of the
 // function defining the succesfully-validated module 'moduleObj'.
--- a/js/src/jit/C1Spewer.h
+++ b/js/src/jit/C1Spewer.h
@@ -4,17 +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 jit_C1Spewer_h
 #define jit_C1Spewer_h
 
 #ifdef DEBUG
 
-#include "jsapi.h"
 #include "NamespaceImports.h"
 
 #include "js/RootingAPI.h"
 
 namespace js {
 namespace jit {
 
 class MDefinition;
--- a/js/src/jsapi.h
+++ b/js/src/jsapi.h
@@ -4,32 +4,29 @@
  * 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/. */
 
 /* JavaScript API. */
 
 #ifndef jsapi_h
 #define jsapi_h
 
-#include "mozilla/Compiler.h"
 #include "mozilla/FloatingPoint.h"
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/RangedPtr.h"
-#include "mozilla/TypeTraits.h"
 
 #include <stdarg.h>
 #include <stddef.h>
 #include <stdint.h>
 #include <stdio.h>
 
 #include "jsalloc.h"
 #include "jspubtd.h"
 
 #include "js/CallArgs.h"
-#include "js/CallNonGenericMethod.h"
 #include "js/Class.h"
 #include "js/HashTable.h"
 #include "js/Id.h"
 #include "js/RootingAPI.h"
 #include "js/Utility.h"
 #include "js/Value.h"
 #include "js/Vector.h"
 
--- a/js/src/jsmath.h
+++ b/js/src/jsmath.h
@@ -4,17 +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 jsmath_h
 #define jsmath_h
 
 #include "mozilla/MemoryReporting.h"
 
-#include "jsapi.h"
 #include "NamespaceImports.h"
 
 namespace js {
 
 typedef double (*UnaryFunType)(double);
 
 class MathCache
 {
--- a/js/src/jsnum.h
+++ b/js/src/jsnum.h
@@ -4,17 +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 jsnum_h
 #define jsnum_h
 
 #include "mozilla/FloatingPoint.h"
 
-#include "jsapi.h"
 #include "NamespaceImports.h"
 
 #include "vm/NumericConversions.h"
 
 extern double js_PositiveInfinity;
 extern double js_NegativeInfinity;
 
 namespace js {
--- a/js/src/jspropertytree.cpp
+++ b/js/src/jspropertytree.cpp
@@ -1,17 +1,16 @@
 /* -*- 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 "jspropertytree.h"
 
-#include "jsapi.h"
 #include "jscntxt.h"
 #include "jsgc.h"
 #include "jstypes.h"
 
 #include "vm/Shape.h"
 
 #include "jsgcinlines.h"
 
--- a/js/src/jsstr.h
+++ b/js/src/jsstr.h
@@ -5,23 +5,23 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 #ifndef jsstr_h
 #define jsstr_h
 
 #include "mozilla/HashFunctions.h"
 #include "mozilla/PodOperations.h"
 
-#include "jsapi.h"
 #include "jsutil.h"
 #include "NamespaceImports.h"
 
 #include "js/RootingAPI.h"
 #include "vm/Unicode.h"
 
+class JSAutoByteString;
 class JSFlatString;
 class JSLinearString;
 class JSStableString;
 
 namespace js {
 
 class StringBuffer;
 
--- a/js/src/jswatchpoint.h
+++ b/js/src/jswatchpoint.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 jswatchpoint_h
 #define jswatchpoint_h
 
 #include "jsalloc.h"
-#include "jsapi.h"
 
 #include "gc/Barrier.h"
 #include "js/HashTable.h"
 #include "js/OldDebugAPI.h"
 
 namespace js {
 
 struct WeakMapTracer;
--- a/js/src/perf/jsperf.h
+++ b/js/src/perf/jsperf.h
@@ -1,17 +1,20 @@
 /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- */
 /* 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 perf_jsperf_h
 #define perf_jsperf_h
 
-#include "jsapi.h"
+#include "jstypes.h"
+
+#include "js/TypeDecls.h"
+#include "js/Utility.h"
 
 namespace JS {
 
 /*
  * JS::PerfMeasurement is a generic way to access detailed performance
  * measurement APIs provided by your operating system.  The details of
  * exactly how this works and what can be measured are highly
  * system-specific, but this interface is (one hopes) implementable
@@ -113,18 +116,18 @@ class JS_FRIEND_API(PerfMeasurement)
 /* Inject a Javascript wrapper around the above C++ class into the
  * Javascript object passed as an argument (this will normally be a
  * global object).  The JS-visible API is identical to the C++ API.
  */
 extern JS_FRIEND_API(JSObject*)
     RegisterPerfMeasurement(JSContext *cx, JSObject *global);
 
 /*
- * Given a jsval which contains an instance of the aforementioned
+ * Given a Value which contains an instance of the aforementioned
  * wrapper class, extract the C++ object.  Returns NULL if the
- * jsval is not an instance of the wrapper.
+ * Value is not an instance of the wrapper.
  */
 extern JS_FRIEND_API(PerfMeasurement*)
-    ExtractPerfMeasurement(jsval wrapper);
+    ExtractPerfMeasurement(Value wrapper);
 
 } // namespace JS
 
 #endif /* perf_jsperf_h */
--- a/js/src/vm/Xdr.h
+++ b/js/src/vm/Xdr.h
@@ -4,17 +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 vm_Xdr_h
 #define vm_Xdr_h
 
 #include "mozilla/Endian.h"
 
-#include "jsapi.h"
 #include "jsatom.h"
 
 namespace js {
 
 /*
  * Bytecode version number. Increment the subtrahend whenever JS bytecode
  * changes incompatibly.
  *