Bug 909171 (part 2) - Fix up jsversion.h includes. r=luke.
authorNicholas Nethercote <nnethercote@mozilla.com>
Mon, 26 Aug 2013 17:09:30 -0700
changeset 157336 96f58548cfd1a157d2039aca914fcd9713c593fc
parent 157335 e3547f7fa0e4dbe206aacba4e8bf7c615b31f83e
child 157337 13233d9a4d9ee7d73d16fb1f73aaa848794091d2
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)
reviewersluke
bugs909171
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 909171 (part 2) - Fix up jsversion.h includes. r=luke.
js/src/frontend/Parser.cpp
js/src/frontend/TokenStream.h
js/src/js-confdefs.h.in
js/src/js-config.h.in
js/src/jsapi.h
js/src/jsstr.cpp
js/src/jstypes.h
js/src/vm/CommonPropertyNames.h
js/src/vm/Keywords.h
js/src/vm/TypedArrayObject.cpp
--- a/js/src/frontend/Parser.cpp
+++ b/js/src/frontend/Parser.cpp
@@ -22,17 +22,16 @@
 #include "jsapi.h"
 #include "jsatom.h"
 #include "jscntxt.h"
 #include "jsfun.h"
 #include "jsobj.h"
 #include "jsopcode.h"
 #include "jsscript.h"
 #include "jstypes.h"
-#include "jsversion.h"
 
 #include "frontend/BytecodeCompiler.h"
 #include "frontend/FoldConstants.h"
 #include "frontend/ParseMaps.h"
 #include "frontend/TokenStream.h"
 #include "jit/AsmJS.h"
 #include "vm/RegExpStatics.h"
 #include "vm/Shape.h"
--- a/js/src/frontend/TokenStream.h
+++ b/js/src/frontend/TokenStream.h
@@ -13,17 +13,16 @@
 #include "mozilla/PodOperations.h"
 
 #include <stdarg.h>
 #include <stddef.h>
 #include <stdio.h>
 
 #include "jscntxt.h"
 #include "jspubtd.h"
-#include "jsversion.h"
 
 #include "js/Vector.h"
 #include "vm/RegExpObject.h"
 
 namespace js {
 namespace frontend {
 
 // Values of this type are used to index into arrays such as isExprEnding[],
--- a/js/src/js-confdefs.h.in
+++ b/js/src/js-confdefs.h.in
@@ -1,13 +1,13 @@
 /* List of defines generated by configure. Included with preprocessor flag,
  * -include, to avoid long list of -D defines on the compile command-line.
  * Do not edit.
  */
 
-#ifndef _JS_CONFDEFS_H_
-#define _JS_CONFDEFS_H_
+#ifndef js_confdefs_h
+#define js_confdefs_h
 
 @ALLDEFINES@
 
 #include "js/RequiredDefines.h"
 
-#endif /* _JS_CONFDEFS_H_ */
+#endif /* js_confdefs_h */
--- a/js/src/js-config.h.in
+++ b/js/src/js-config.h.in
@@ -1,17 +1,17 @@
 /* -*- Mode: C; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*-
  * vim: set ts=8 sw=4 et tw=78:
  *
  * 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 js_config_h___
-#define js_config_h___
+#ifndef js_config_h
+#define js_config_h
 
 /* Definitions set at build time that affect SpiderMonkey's public API.
    This header file is generated by the SpiderMonkey configure script,
    and installed along with jsapi.h.  */
 
 /* Define to 1 if SpiderMonkey should support multi-threaded clients.  */
 #undef JS_THREADSAFE
 
@@ -37,9 +37,9 @@
 /* The configure script defines these if it doesn't #define
    JS_HAVE_STDINT_H.  */
 #undef JS_BYTES_PER_WORD
 
 /* MOZILLA JSAPI version number components */
 #undef MOZJS_MAJOR_VERSION
 #undef MOZJS_MINOR_VERSION
 
-#endif /* js_config_h___ */
+#endif /* js_config_h */
--- a/js/src/jsapi.h
+++ b/js/src/jsapi.h
@@ -13,17 +13,16 @@
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/RangedPtr.h"
 
 #include <stdarg.h>
 #include <stddef.h>
 #include <stdint.h>
 #include <stdio.h>
 
-#include "js-config.h"
 #include "jsalloc.h"
 #include "jspubtd.h"
 
 #include "js/CallArgs.h"
 #include "js/HashTable.h"
 #include "js/RootingAPI.h"
 #include "js/Utility.h"
 #include "js/Value.h"
--- a/js/src/jsstr.cpp
+++ b/js/src/jsstr.cpp
@@ -32,17 +32,16 @@
 #include "jsbool.h"
 #include "jscntxt.h"
 #include "jsgc.h"
 #include "jsnum.h"
 #include "jsobj.h"
 #include "jsopcode.h"
 #include "jstypes.h"
 #include "jsutil.h"
-#include "jsversion.h"
 
 #include "builtin/RegExp.h"
 #include "vm/GlobalObject.h"
 #include "vm/Interpreter.h"
 #include "vm/NumericConversions.h"
 #include "vm/RegExpObject.h"
 #include "vm/RegExpStatics.h"
 #include "vm/ScopeObject.h"
--- a/js/src/jstypes.h
+++ b/js/src/jstypes.h
@@ -19,17 +19,24 @@
 **/
 
 #ifndef jstypes_h
 #define jstypes_h
 
 #include "mozilla/Attributes.h"
 #include "mozilla/Types.h"
 
+// jstypes.h is (or should be!) included by every file in SpiderMonkey.
+// js-config.h and jsversion.h also should be included by every file.
+// So include them here.
+// XXX: including them in js/RequiredDefines.h should be a better option, since
+// that is by definition the header file that should be included in all
+// SpiderMonkey code.  However, Gecko doesn't do this!  See bug 909576.
 #include "js-config.h"
+#include "jsversion.h"
 
 /***********************************************************************
 ** MACROS:      JS_EXTERN_API
 **              JS_EXPORT_API
 ** DESCRIPTION:
 **      These are only for externally visible routines and globals.  For
 **      internal routines, just use "extern" for type checking and that
 **      will not export internal cross-file or forward-declared symbols.
--- a/js/src/vm/CommonPropertyNames.h
+++ b/js/src/vm/CommonPropertyNames.h
@@ -5,17 +5,16 @@
  * file, You can obtain one at http://mozilla.org/MPL/2.0/. */
 
 /* A higher-order macro for enumerating all cached property names. */
 
 #ifndef vm_CommonPropertyNames_h
 #define vm_CommonPropertyNames_h
 
 #include "jsprototypes.h"
-#include "jsversion.h"
 
 #define FOR_EACH_COMMON_PROPERTYNAME(macro) \
     macro(anonymous, anonymous, "anonymous") \
     macro(apply, apply, "apply") \
     macro(arguments, arguments, "arguments") \
     macro(buffer, buffer, "buffer") \
     macro(builder, builder, "builder") \
     macro(byteLength, byteLength, "byteLength") \
--- a/js/src/vm/Keywords.h
+++ b/js/src/vm/Keywords.h
@@ -4,18 +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/. */
 
 /* A higher-order macro for enumerating keyword tokens. */
 
 #ifndef vm_Keywords_h
 #define vm_Keywords_h
 
-#include "jsversion.h"
-
 #if JS_HAS_CONST
 #  define FOR_CONST_KEYWORD(macro) \
       macro(const, const_, TOK_CONST, JSVERSION_DEFAULT)
 #else
 #  define FOR_CONST_KEYWORD(macro) \
       macro(const, const_, TOK_RESERVED, JSVERSION_DEFAULT)
 #endif
 #if JS_HAS_BLOCK_SCOPE
--- a/js/src/vm/TypedArrayObject.cpp
+++ b/js/src/vm/TypedArrayObject.cpp
@@ -18,17 +18,16 @@
 #include "jsapi.h"
 #include "jsarray.h"
 #include "jscntxt.h"
 #include "jscpucfg.h"
 #include "jsnum.h"
 #include "jsobj.h"
 #include "jstypes.h"
 #include "jsutil.h"
-#include "jsversion.h"
 #ifdef XP_WIN
 # include "jswin.h"
 #endif
 #include "jswrapper.h"
 
 #include "gc/Barrier.h"
 #include "gc/Marking.h"
 #include "jit/AsmJS.h"