Bug 883696 (part 4) - Include full paths in #include statements in the rest of js/src/ and js/public/. r=luke.
authorNicholas Nethercote <nnethercote@mozilla.com>
Thu, 27 Jun 2013 17:37:29 -0700
changeset 136758 699228670afbbf94c0de128de808a270890df642
parent 136757 634b48dc2f065f14ac13bd8c9a60c811622c225e
child 136759 cec705c007776b382df5b906eb209b071dd5d307
push idunknown
push userunknown
push dateunknown
reviewersluke
bugs883696
milestone25.0a1
Bug 883696 (part 4) - Include full paths in #include statements in the rest of js/src/ and js/public/. r=luke.
js/public/GCAPI.h
js/public/Vector.h
js/src/ctypes/CTypes.cpp
js/src/ctypes/CTypes.h
js/src/ctypes/Library.cpp
js/src/ds/FixedSizeHash.h
js/src/ds/LifoAlloc.cpp
js/src/ds/SplayTree.h
js/src/dtoa.c
js/src/frontend/FullParseHandler.h
js/src/frontend/ParseMaps.cpp
js/src/ion/IonTypes.h
js/src/jsutil.h
js/src/perf/jsperf.cpp
js/src/perf/pm_linux.cpp
js/src/perf/pm_stub.cpp
js/src/prmjtime.cpp
js/src/shell/js.cpp
js/src/shell/jsoptparse.cpp
js/src/vm/DateTime.cpp
js/src/vm/DateTime.h
js/src/vm/GlobalObject.cpp
js/src/vm/Interpreter.cpp
js/src/vm/NumberObject-inl.h
js/src/vm/Probes.cpp
js/src/vm/RegExpObject-inl.h
js/src/vm/ScopeObject-inl.h
js/src/vm/ScopeObject.cpp
js/src/vm/Stack-inl.h
js/src/vm/StringObject-inl.h
js/src/vm/Unicode.cpp
--- a/js/public/GCAPI.h
+++ b/js/public/GCAPI.h
@@ -2,17 +2,17 @@
  * 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 js_GCAPI_h
 #define js_GCAPI_h
 
-#include "HeapAPI.h"
+#include "js/HeapAPI.h"
 
 namespace JS {
 
 #define GCREASONS(D)                            \
     /* Reasons internal to the JS engine */     \
     D(API)                                      \
     D(MAYBEGC)                                  \
     D(LAST_CONTEXT)                             \
--- a/js/public/Vector.h
+++ b/js/public/Vector.h
@@ -6,18 +6,18 @@
 
 #ifndef js_Vector_h
 #define js_Vector_h
 
 #include "mozilla/Attributes.h"
 #include "mozilla/MemoryReporting.h"
 #include "mozilla/TypeTraits.h"
 
-#include "TemplateLib.h"
-#include "Utility.h"
+#include "js/TemplateLib.h"
+#include "js/Utility.h"
 
 /* Silence dire "bugs in previous versions of MSVC have been fixed" warnings */
 #ifdef _MSC_VER
 #pragma warning(push)
 #pragma warning(disable:4345)
 #endif
 
 namespace js {
--- a/js/src/ctypes/CTypes.cpp
+++ b/js/src/ctypes/CTypes.cpp
@@ -785,17 +785,17 @@ GetABICode(JSObject* obj)
 
   jsval result = JS_GetReservedSlot(obj, SLOT_ABICODE);
   return ABICode(JSVAL_TO_INT(result));
 }
 
 JSErrorFormatString ErrorFormatString[CTYPESERR_LIMIT] = {
 #define MSG_DEF(name, number, count, exception, format) \
   { format, count, exception } ,
-#include "ctypes.msg"
+#include "ctypes/ctypes.msg"
 #undef MSG_DEF
 };
 
 const JSErrorFormatString*
 GetErrorMessage(void* userRef, const char* locale, const unsigned errorNumber)
 {
   if (0 < errorNumber && errorNumber < CTYPESERR_LIMIT)
     return &ErrorFormatString[errorNumber];
@@ -1200,17 +1200,17 @@ InitTypeClasses(JSContext* cx, HandleObj
   //     * 'constructor' property === 't'
 #define DEFINE_TYPE(name, type, ffiType)                                       \
   RootedObject typeObj_##name(cx,                                              \
     CType::DefineBuiltin(cx, parent, #name, CTypeProto, CDataProto, #name,     \
       TYPE_##name, INT_TO_JSVAL(sizeof(type)),                                 \
       INT_TO_JSVAL(ffiType.alignment), &ffiType));                             \
   if (!typeObj_##name)                                                         \
     return false;
-#include "typedefs.h"
+#include "ctypes/typedefs.h"
 
   // Alias 'ctypes.unsigned' as 'ctypes.unsigned_int', since they represent
   // the same type in C.
   if (!JS_DefineProperty(cx, parent, "unsigned",
          OBJECT_TO_JSVAL(typeObj_unsigned_int), NULL, NULL,
          JSPROP_ENUMERATE | JSPROP_READONLY | JSPROP_PERMANENT))
     return false;
 
@@ -1587,17 +1587,17 @@ jsvalToInteger(JSContext* cx, jsval val,
       switch (CType::GetTypeCode(typeObj)) {
 #define DEFINE_INT_TYPE(name, fromType, ffiType)                               \
       case TYPE_##name:                                                        \
         if (!IsAlwaysExact<IntegerType, fromType>())                           \
           return false;                                                        \
         *result = IntegerType(*static_cast<fromType*>(data));                  \
         return true;
 #define DEFINE_WRAPPED_INT_TYPE(x, y, z) DEFINE_INT_TYPE(x, y, z)
-#include "typedefs.h"
+#include "ctypes/typedefs.h"
       case TYPE_void_t:
       case TYPE_bool:
       case TYPE_float:
       case TYPE_double:
       case TYPE_float32_t:
       case TYPE_float64_t:
       case TYPE_char:
       case TYPE_signed_char:
@@ -1677,17 +1677,17 @@ jsvalToFloat(JSContext *cx, jsval val, F
 #define DEFINE_FLOAT_TYPE(name, fromType, ffiType)                             \
       case TYPE_##name:                                                        \
         if (!IsAlwaysExact<FloatType, fromType>())                             \
           return false;                                                        \
         *result = FloatType(*static_cast<fromType*>(data));                    \
         return true;
 #define DEFINE_INT_TYPE(x, y, z) DEFINE_FLOAT_TYPE(x, y, z)
 #define DEFINE_WRAPPED_INT_TYPE(x, y, z) DEFINE_INT_TYPE(x, y, z)
-#include "typedefs.h"
+#include "ctypes/typedefs.h"
       case TYPE_void_t:
       case TYPE_bool:
       case TYPE_char:
       case TYPE_signed_char:
       case TYPE_unsigned_char:
       case TYPE_jschar:
       case TYPE_pointer:
       case TYPE_function:
@@ -2096,17 +2096,17 @@ ConvertToJS(JSContext* cx,
     break;                                                                     \
   }
 #define DEFINE_CHAR_TYPE(name, type, ffiType)                                  \
   case TYPE_##name:                                                            \
     /* Convert to an integer. We have no idea what character encoding to */    \
     /* use, if any. */                                                         \
     *result = INT_TO_JSVAL(*static_cast<type*>(data));                         \
     break;
-#include "typedefs.h"
+#include "ctypes/typedefs.h"
   case TYPE_jschar: {
     // Convert the jschar to a 1-character string.
     JSString* str = JS_NewUCStringCopyN(cx, static_cast<jschar*>(data), 1);
     if (!str)
       return false;
 
     *result = STRING_TO_JSVAL(str);
     break;
@@ -2282,17 +2282,17 @@ ImplicitConvert(JSContext* cx,
         return false;                                                          \
       result = chars[0];                                                       \
     } else if (!jsvalToInteger(cx, val, &result)) {                            \
       return TypeError(cx, #name, val);                                        \
     }                                                                          \
     *static_cast<type*>(buffer) = result;                                      \
     break;                                                                     \
   }
-#include "typedefs.h"
+#include "ctypes/typedefs.h"
   case TYPE_pointer: {
     if (JSVAL_IS_NULL(val)) {
       // Convert to a null pointer.
       *static_cast<void**>(buffer) = NULL;
       break;
     }
 
     JS::Rooted<JSObject*> baseType(cx, PointerType::GetBaseType(targetType));
@@ -2617,17 +2617,17 @@ ExplicitConvert(JSContext* cx, HandleVal
          !StringToInteger(cx, JSVAL_TO_STRING(val), &result)))                 \
       return TypeError(cx, #name, val);                                        \
     *static_cast<type*>(buffer) = result;                                      \
     break;                                                                     \
   }
 #define DEFINE_WRAPPED_INT_TYPE(x, y, z) DEFINE_INT_TYPE(x, y, z)
 #define DEFINE_CHAR_TYPE(x, y, z) DEFINE_INT_TYPE(x, y, z)
 #define DEFINE_JSCHAR_TYPE(x, y, z) DEFINE_CHAR_TYPE(x, y, z)
-#include "typedefs.h"
+#include "ctypes/typedefs.h"
   case TYPE_pointer: {
     // Convert a number, Int64 object, or UInt64 object to a pointer.
     uintptr_t result;
     if (!jsvalToPtrExplicit(cx, val, &result))
       return TypeError(cx, "pointer", val);
     *static_cast<uintptr_t*>(buffer) = result;
     break;
   }
@@ -2773,17 +2773,17 @@ BuildTypeSource(JSContext* cx,
 {
   RootedObject typeObj(cx, typeObj_);
 
   // Walk the types, building up the toSource() string.
   switch (CType::GetTypeCode(typeObj)) {
   case TYPE_void_t:
 #define DEFINE_TYPE(name, type, ffiType)  \
   case TYPE_##name:
-#include "typedefs.h"
+#include "ctypes/typedefs.h"
   {
     AppendString(result, "ctypes.");
     JSString* nameStr = CType::GetName(cx, typeObj);
     AppendString(result, nameStr);
     break;
   }
   case TYPE_pointer: {
     RootedObject baseType(cx, PointerType::GetBaseType(typeObj));
@@ -2958,17 +2958,17 @@ BuildDataSource(JSContext* cx,
     result.append(str, strlen(str));                                           \
     break;                                                                     \
   }
 #define DEFINE_CHAR_TYPE(name, type, ffiType)                                  \
   case TYPE_##name:                                                            \
     /* Serialize as an integer. */                                             \
     IntegerToString(*static_cast<type*>(data), 10, result);                    \
     break;
-#include "typedefs.h"
+#include "ctypes/typedefs.h"
   case TYPE_jschar: {
     // Serialize as a 1-character JS string.
     JSString* str = JS_NewUCStringCopyN(cx, static_cast<jschar*>(data), 1);
     if (!str)
       return false;
 
     // Escape characters, and quote as necessary.
     JSString* src = JS_ValueToSource(cx, STRING_TO_JSVAL(str));
@@ -5853,17 +5853,17 @@ FunctionType::Call(JSContext* cx,
       ffi_arg data = *static_cast<ffi_arg*>(returnValue.mData);                \
       *static_cast<type*>(returnValue.mData) = static_cast<type>(data);        \
     }                                                                          \
     break;
 #define DEFINE_WRAPPED_INT_TYPE(x, y, z) DEFINE_INT_TYPE(x, y, z)
 #define DEFINE_BOOL_TYPE(x, y, z) DEFINE_INT_TYPE(x, y, z)
 #define DEFINE_CHAR_TYPE(x, y, z) DEFINE_INT_TYPE(x, y, z)
 #define DEFINE_JSCHAR_TYPE(x, y, z) DEFINE_INT_TYPE(x, y, z)
-#include "typedefs.h"
+#include "ctypes/typedefs.h"
   default:
     break;
   }
 
   // prepare a JS object from the result
   RootedObject returnType(cx, fninfo->mReturnType);
   return ConvertToJS(cx, returnType, NullPtr(), returnValue.mData, false, true, vp);
 }
@@ -6145,17 +6145,17 @@ CClosure::ClosureStub(ffi_cif* cif, void
     rvSize = cif->rtype->size;
     switch (typeCode) {
 #define DEFINE_INT_TYPE(name, type, ffiType)                                   \
     case TYPE_##name:
 #define DEFINE_WRAPPED_INT_TYPE(x, y, z) DEFINE_INT_TYPE(x, y, z)
 #define DEFINE_BOOL_TYPE(x, y, z) DEFINE_INT_TYPE(x, y, z)
 #define DEFINE_CHAR_TYPE(x, y, z) DEFINE_INT_TYPE(x, y, z)
 #define DEFINE_JSCHAR_TYPE(x, y, z) DEFINE_INT_TYPE(x, y, z)
-#include "typedefs.h"
+#include "ctypes/typedefs.h"
       rvSize = Align(rvSize, sizeof(ffi_arg));
       break;
     default:
       break;
     }
     memset(result, 0, rvSize);
   }
 
@@ -6233,17 +6233,17 @@ CClosure::ClosureStub(ffi_cif* cif, void
       ffi_arg data = *static_cast<type*>(result);                              \
       *static_cast<ffi_arg*>(result) = data;                                   \
     }                                                                          \
     break;
 #define DEFINE_WRAPPED_INT_TYPE(x, y, z) DEFINE_INT_TYPE(x, y, z)
 #define DEFINE_BOOL_TYPE(x, y, z) DEFINE_INT_TYPE(x, y, z)
 #define DEFINE_CHAR_TYPE(x, y, z) DEFINE_INT_TYPE(x, y, z)
 #define DEFINE_JSCHAR_TYPE(x, y, z) DEFINE_INT_TYPE(x, y, z)
-#include "typedefs.h"
+#include "ctypes/typedefs.h"
   default:
     break;
   }
 }
 
 /*******************************************************************************
 ** CData implementation
 *******************************************************************************/
--- a/js/src/ctypes/CTypes.h
+++ b/js/src/ctypes/CTypes.h
@@ -173,17 +173,17 @@ ASSERT_OK(JSBool ok)
 {
   JS_ASSERT(ok);
 }
 
 // for JS error reporting
 enum ErrorNum {
 #define MSG_DEF(name, number, count, exception, format) \
   name = number,
-#include "ctypes.msg"
+#include "ctypes/ctypes.msg"
 #undef MSG_DEF
   CTYPESERR_LIMIT
 };
 
 const JSErrorFormatString*
 GetErrorMessage(void* userRef, const char* locale, const unsigned errorNumber);
 JSBool TypeError(JSContext* cx, const char* expected, jsval actual);
 
@@ -199,17 +199,17 @@ enum ABICode {
   ABI_STDCALL,
   ABI_WINAPI,
   INVALID_ABI
 };
 
 enum TypeCode {
   TYPE_void_t,
 #define DEFINE_TYPE(name, type, ffiType) TYPE_##name,
-#include "typedefs.h"
+#include "ctypes/typedefs.h"
   TYPE_pointer,
   TYPE_function,
   TYPE_array,
   TYPE_struct
 };
 
 // Descriptor of one field in a StructType. The name of the field is stored
 // as the key to the hash entry.
--- a/js/src/ctypes/Library.cpp
+++ b/js/src/ctypes/Library.cpp
@@ -1,18 +1,18 @@
 /* -*- Mode: C++; tab-width: 2; indent-tabs-mode: nil; c-basic-offset: 2 -*-
  * vim: set ts=2 sw=2 et 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 "jsstr.h"
-#include "Library.h"
-#include "CTypes.h"
+#include "ctypes/Library.h"
+#include "ctypes/CTypes.h"
 #include "prlink.h"
 
 namespace js {
 namespace ctypes {
 
 /*******************************************************************************
 ** JSAPI function prototypes
 *******************************************************************************/
--- a/js/src/ds/FixedSizeHash.h
+++ b/js/src/ds/FixedSizeHash.h
@@ -2,17 +2,17 @@
  * 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 jsfixedsizehash_h_
 #define jsfixedsizehash_h_
 
-#include "LifoAlloc.h"
+#include "ds/LifoAlloc.h"
 
 namespace js {
 
 /*
  * Class representing a hash set with fixed capacity, with newer entries
  * evicting older entries. Each entry has several hashes and can be stored in
  * different buckets, with the choice of which to evict on insertion being
  * managed via LRU. For tables with a relatively small size, using different
--- a/js/src/ds/LifoAlloc.cpp
+++ b/js/src/ds/LifoAlloc.cpp
@@ -1,15 +1,15 @@
 /* -*- 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 "LifoAlloc.h"
+#include "ds/LifoAlloc.h"
 
 using namespace js;
 
 namespace js {
 namespace detail {
 
 BumpChunk *
 BumpChunk::new_(size_t chunkSize)
--- a/js/src/ds/SplayTree.h
+++ b/js/src/ds/SplayTree.h
@@ -2,17 +2,17 @@
  * 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_SplayTree_h
 #define ds_SplayTree_h
 
-#include "LifoAlloc.h"
+#include "ds/LifoAlloc.h"
 
 namespace js {
 
 /*
  * Class which represents a splay tree with nodes allocated from a LifoAlloc.
  * Splay trees are balanced binary search trees for which search, insert and
  * remove are all amortized O(log n).
  *
--- a/js/src/dtoa.c
+++ b/js/src/dtoa.c
@@ -159,25 +159,25 @@
 #ifndef Long
 #define Long long
 #endif
 #ifndef ULong
 typedef unsigned Long ULong;
 #endif
 
 #ifdef DEBUG
-#include "stdio.h"
+#include <stdio.h>
 #define Bug(x) {fprintf(stderr, "%s\n", x); exit(1);}
 #endif
 
-#include "stdlib.h"
-#include "string.h"
+#include <stdlib.h>
+#include <string.h>
 
 #ifdef USE_LOCALE
-#include "locale.h"
+#include <locale.h>
 #endif
 
 #ifdef MALLOC
 #ifdef KR_headers
 extern char *MALLOC();
 #else
 extern void *MALLOC(size_t);
 #endif
@@ -200,17 +200,17 @@ extern void *MALLOC(size_t);
 #undef Avoid_Underflow
 #ifdef IEEE_MC68k
 #define IEEE_Arith
 #endif
 #ifdef IEEE_8087
 #define IEEE_Arith
 #endif
 
-#include "errno.h"
+#include <errno.h>
 
 #ifdef Bad_float_h
 
 #ifdef IEEE_Arith
 #define DBL_DIG 15
 #define DBL_MAX_10_EXP 308
 #define DBL_MAX_EXP 1024
 #define FLT_RADIX 2
@@ -232,21 +232,21 @@ extern void *MALLOC(size_t);
 #define DBL_MAX 1.7014118346046923e+38
 #endif
 
 #ifndef LONG_MAX
 #define LONG_MAX 2147483647
 #endif
 
 #else /* ifndef Bad_float_h */
-#include "float.h"
+#include <float.h>
 #endif /* Bad_float_h */
 
 #ifndef __MATH_H__
-#include "math.h"
+#include <math.h>
 #endif
 
 #ifndef CONST
 #ifdef KR_headers
 #define CONST /* blank */
 #else
 #define CONST const
 #endif
--- a/js/src/frontend/FullParseHandler.h
+++ b/js/src/frontend/FullParseHandler.h
@@ -4,18 +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 frontend_FullParseHandler_h
 #define frontend_FullParseHandler_h
 
 #include "mozilla/PodOperations.h"
 
-#include "ParseNode.h"
-#include "SharedContext.h"
+#include "frontend/ParseNode.h"
+#include "frontend/SharedContext.h"
 
 namespace js {
 namespace frontend {
 
 template <typename ParseHandler>
 class Parser;
 
 class SyntaxParseHandler;
--- a/js/src/frontend/ParseMaps.cpp
+++ b/js/src/frontend/ParseMaps.cpp
@@ -1,19 +1,19 @@
 /* -*- 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 "FullParseHandler.h"
-#include "SyntaxParseHandler.h"
+#include "frontend/FullParseHandler.h"
+#include "frontend/SyntaxParseHandler.h"
 
-#include "ParseMaps-inl.h"
+#include "frontend/ParseMaps-inl.h"
 #include "vm/String-inl.h"
 
 using namespace js;
 using namespace js::frontend;
 
 void
 ParseMapPool::checkInvariants()
 {
--- a/js/src/ion/IonTypes.h
+++ b/js/src/ion/IonTypes.h
@@ -3,17 +3,17 @@
  * 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 ion_IonTypes_h
 #define ion_IonTypes_h
 
 #include "js/Value.h"
-#include <jstypes.h>
+#include "jstypes.h"
 
 namespace js {
 namespace ion {
 
 typedef uint32_t SnapshotOffset;
 typedef uint32_t BailoutId;
 
 static const SnapshotOffset INVALID_SNAPSHOT_OFFSET = uint32_t(-1);
--- a/js/src/jsutil.h
+++ b/js/src/jsutil.h
@@ -13,17 +13,17 @@
 
 #include "mozilla/Attributes.h"
 #include "mozilla/Compiler.h"
 #include "mozilla/GuardObjects.h"
 
 #include "js/Utility.h"
 
 #ifdef USE_ZLIB
-#include "zlib.h"
+#include <zlib.h>
 #endif
 
 /* Forward declarations. */
 struct JSContext;
 
 static JS_ALWAYS_INLINE void *
 js_memcpy(void *dst_, const void *src_, size_t len)
 {
--- a/js/src/perf/jsperf.cpp
+++ b/js/src/perf/jsperf.cpp
@@ -1,14 +1,14 @@
 /* -*- 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/. */
 
-#include "jsperf.h"
+#include "perf/jsperf.h"
 
 #include "jscntxt.h" /* for error messages */
 #include "jsobj.h" /* for unwrapping without a context */
 
 #include "vm/ObjectImpl-inl.h"
 
 using JS::PerfMeasurement;
 
--- a/js/src/perf/pm_linux.cpp
+++ b/js/src/perf/pm_linux.cpp
@@ -1,14 +1,14 @@
 /* -*- 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/. */
 
-#include "jsperf.h"
+#include "perf/jsperf.h"
 #include "jsutil.h"
 
 using namespace js;
 
 /* This variant of nsIPerfMeasurement uses the perf_event interface
  * added in Linux 2.6.31.  We key compilation of this file off the
  * existence of <linux/perf_event.h>.
  */
--- a/js/src/perf/pm_stub.cpp
+++ b/js/src/perf/pm_stub.cpp
@@ -1,14 +1,14 @@
 /* -*- 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/. */
 
-#include "jsperf.h"
+#include "perf/jsperf.h"
 
 namespace JS {
 
 PerfMeasurement::PerfMeasurement(PerfMeasurement::EventMask)
   : impl(0),
     eventsMeasured(EventMask(0)),
     cpu_cycles(-1),
     instructions(-1),
--- a/js/src/prmjtime.cpp
+++ b/js/src/prmjtime.cpp
@@ -35,17 +35,17 @@
 #define NS_HAVE_INVALID_PARAMETER_HANDLER 1
 #endif
 #ifdef NS_HAVE_INVALID_PARAMETER_HANDLER
 #include <stdlib.h>   /* for _set_invalid_parameter_handler */
 #include <crtdbg.h>   /* for _CrtSetReportMode */
 #endif
 
 #ifdef JS_THREADSAFE
-#include <prinit.h>
+#include "prinit.h"
 #endif
 
 #endif
 
 #ifdef XP_UNIX
 
 #ifdef _SVID_GETTOD   /* Defined only on Solaris, see Solaris <sys/types.h> */
 extern int gettimeofday(struct timeval *tv);
--- a/js/src/shell/js.cpp
+++ b/js/src/shell/js.cpp
@@ -34,27 +34,27 @@
 #include "jsobj.h"
 #include "json.h"
 #include "jsreflect.h"
 #include "jsscript.h"
 #include "jstypedarray.h"
 #include "jstypedarrayinlines.h"
 #include "jsworkers.h"
 #include "jswrapper.h"
-#include "jsperf.h"
+#include "perf/jsperf.h"
 
 #include "builtin/TestingFunctions.h"
 #include "frontend/BytecodeEmitter.h"
 #include "frontend/Parser.h"
 #include "vm/Shape.h"
 
 #include "prmjtime.h"
 
-#include "jsoptparse.h"
-#include "jsheaptools.h"
+#include "shell/jsoptparse.h"
+#include "shell/jsheaptools.h"
 
 #include "jsinferinlines.h"
 #include "jsscriptinlines.h"
 #include "ion/Ion.h"
 
 #include "vm/Interpreter-inl.h"
 
 #ifdef XP_UNIX
--- a/js/src/shell/jsoptparse.cpp
+++ b/js/src/shell/jsoptparse.cpp
@@ -1,15 +1,15 @@
 /* -*- 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 "jsoptparse.h"
+#include "shell/jsoptparse.h"
 
 #include <ctype.h>
 #include <stdarg.h>
 
 #include "jsutil.h"
 
 using namespace js;
 using namespace js::cli;
--- a/js/src/vm/DateTime.cpp
+++ b/js/src/vm/DateTime.cpp
@@ -1,15 +1,15 @@
 /* -*- 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 "DateTime.h"
+#include "vm/DateTime.h"
 
 #include <time.h>
 
 #include "jsutil.h"
 
 using mozilla::UnspecifiedNaN;
 
 static bool
--- a/js/src/vm/DateTime.h
+++ b/js/src/vm/DateTime.h
@@ -6,17 +6,17 @@
 
 #ifndef vm_DateTime_h
 #define vm_DateTime_h
 
 #include "mozilla/FloatingPoint.h"
 #include "mozilla/MathAlgorithms.h"
 #include "mozilla/StandardInteger.h"
 
-#include "NumericConversions.h"
+#include "vm/NumericConversions.h"
 
 namespace js {
 
 /* Constants defined by ES5 15.9.1.10. */
 const double HoursPerDay = 24;
 const double MinutesPerHour = 60;
 const double SecondsPerMinute = 60;
 const double msPerSecond = 1000;
--- a/js/src/vm/GlobalObject.cpp
+++ b/js/src/vm/GlobalObject.cpp
@@ -1,15 +1,15 @@
 /* -*- 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 "GlobalObject.h"
+#include "vm/GlobalObject.h"
 
 #include "jscntxt.h"
 #include "jsdate.h"
 #include "jsexn.h"
 #include "jsfriendapi.h"
 #include "jsmath.h"
 #include "json.h"
 #include "jsweakmap.h"
--- a/js/src/vm/Interpreter.cpp
+++ b/js/src/vm/Interpreter.cpp
@@ -3,17 +3,17 @@
  * 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/. */
 
 /*
  * JavaScript bytecode interpreter.
  */
 
-#include "Interpreter.h"
+#include "vm/Interpreter.h"
 
 #include "mozilla/DebugOnly.h"
 #include "mozilla/FloatingPoint.h"
 #include "mozilla/PodOperations.h"
 
 #include <string.h>
 
 #include "jsapi.h"
--- a/js/src/vm/NumberObject-inl.h
+++ b/js/src/vm/NumberObject-inl.h
@@ -2,17 +2,17 @@
  * 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 vm_NumberObject_inl_h
 #define vm_NumberObject_inl_h
 
-#include "NumberObject.h"
+#include "vm/NumberObject.h"
 
 #include "jsobjinlines.h"
 
 namespace js {
 
 inline NumberObject *
 NumberObject::create(JSContext *cx, double d)
 {
--- a/js/src/vm/Probes.cpp
+++ b/js/src/vm/Probes.cpp
@@ -1,15 +1,15 @@
 /* -*- 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 "Probes-inl.h"
+#include "vm/Probes-inl.h"
 
 #include "jscntxt.h"
 
 #ifdef INCLUDE_MOZILLA_DTRACE
 #include "jsscriptinlines.h" 
 #endif
 
 #define TYPEOF(cx,v)    (JSVAL_IS_NULL(v) ? JSTYPE_NULL : JS_TypeOfValue(cx,v))
--- a/js/src/vm/RegExpObject-inl.h
+++ b/js/src/vm/RegExpObject-inl.h
@@ -4,21 +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_RegExpObject_inl_h
 #define vm_RegExpObject_inl_h
 
 #include "mozilla/Util.h"
 
-#include "RegExpObject.h"
+#include "vm/RegExpObject.h"
 
 #include "jsstrinlines.h"
 
-#include "String-inl.h"
+#include "vm/String-inl.h"
 
 namespace js {
 
 inline RegExpShared *
 RegExpObject::maybeShared() const
 {
     return static_cast<RegExpShared *>(JSObject::getPrivate());
 }
--- a/js/src/vm/ScopeObject-inl.h
+++ b/js/src/vm/ScopeObject-inl.h
@@ -2,17 +2,17 @@
  * 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 vm_ScopeObject_inl_h
 #define vm_ScopeObject_inl_h
 
-#include "ScopeObject.h"
+#include "vm/ScopeObject.h"
 
 #include "jsinferinlines.h"
 #include "jsobjinlines.h"
 #include "jsscriptinlines.h"
 
 template<>
 inline bool
 JSObject::is<js::ClonedBlockObject>() const
--- a/js/src/vm/ScopeObject.cpp
+++ b/js/src/vm/ScopeObject.cpp
@@ -4,20 +4,20 @@
  * 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 "mozilla/PodOperations.h"
 
 #include "jscompartment.h"
 #include "jsiter.h"
 
-#include "GlobalObject.h"
-#include "ScopeObject.h"
-#include "Shape.h"
-#include "Xdr.h"
+#include "vm/GlobalObject.h"
+#include "vm/ScopeObject.h"
+#include "vm/Shape.h"
+#include "vm/Xdr.h"
 
 #include "jsatominlines.h"
 #include "jsobjinlines.h"
 
 #include "gc/Barrier-inl.h"
 #include "vm/ScopeObject-inl.h"
 #include "vm/Stack-inl.h"
 
--- a/js/src/vm/Stack-inl.h
+++ b/js/src/vm/Stack-inl.h
@@ -14,18 +14,18 @@
 
 #include "vm/Stack.h"
 #include "ion/BaselineFrame.h"
 #include "ion/BaselineFrame-inl.h"
 #include "ion/IonFrameIterator-inl.h"
 
 #include "jsscriptinlines.h"
 
-#include "ArgumentsObject-inl.h"
-#include "ScopeObject-inl.h"
+#include "vm/ArgumentsObject-inl.h"
+#include "vm/ScopeObject-inl.h"
 
 namespace js {
 
 /*
  * We cache name lookup results only for the global object or for native
  * non-global objects without prototype or with prototype that never mutates,
  * see bug 462734 and bug 487039.
  */
--- a/js/src/vm/StringObject-inl.h
+++ b/js/src/vm/StringObject-inl.h
@@ -2,17 +2,17 @@
  * 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 vm_StringObject_inl_h
 #define vm_StringObject_inl_h
 
-#include "StringObject.h"
+#include "vm/StringObject.h"
 
 #include "jsobjinlines.h"
 
 namespace js {
 
 inline bool
 StringObject::init(JSContext *cx, HandleString str)
 {
--- a/js/src/vm/Unicode.cpp
+++ b/js/src/vm/Unicode.cpp
@@ -1,15 +1,15 @@
 /* Generated by make_unicode.py DO NOT MODIFY */
 
 /*
  * Any copyright is dedicated to the Public Domain.
  * http://creativecommons.org/licenses/publicdomain/
  */
-#include "Unicode.h"
+#include "vm/Unicode.h"
 
 using namespace js;
 using namespace js::unicode;
 
 /*
  * So how does indexing work?
  * First let's have a look at a jschar, 16-bits:
  *              [................]