From 7fb9b3a9b0e4049c652309f7bef062a2edf518b3 Mon Sep 17 00:00:00 2001 From: Ehsan Akhgari Date: Thu, 26 Sep 2013 18:34:54 -0400 Subject: [PATCH] Bug 921130 - Minimize the #includes in js/src/jit; r=luke --- js/public/CharacterEncoding.h | 7 +++++-- js/src/assembler/assembler/MacroAssemblerCodeRef.h | 1 + js/src/builtin/Intl.h | 2 -- js/src/builtin/Object.h | 7 ++++--- js/src/builtin/ParallelArray.h | 2 -- js/src/builtin/Profilers.cpp | 10 +++++++--- js/src/ctypes/CTypes.cpp | 2 -- js/src/ctypes/CTypes.h | 4 +++- js/src/ctypes/Library.cpp | 2 -- js/src/frontend/BytecodeEmitter.cpp | 2 -- js/src/frontend/ParseMaps.h | 1 - js/src/frontend/ParseNode.h | 2 -- js/src/gc/Barrier.h | 4 +++- js/src/gc/FindSCCs.h | 1 + js/src/gc/Marking.cpp | 4 +++- js/src/gc/Marking.h | 1 - js/src/gc/RootMarking.cpp | 2 -- js/src/jit/AsmJS.cpp | 1 + js/src/jit/AsmJSModule.h | 3 ++- js/src/jit/BacktrackingAllocator.cpp | 2 +- js/src/jit/BaselineBailouts.cpp | 2 -- js/src/jit/BaselineCompiler.cpp | 1 - js/src/jit/BaselineCompiler.h | 5 ----- js/src/jit/BaselineFrame-inl.h | 1 - js/src/jit/BaselineFrame.cpp | 1 - js/src/jit/BaselineFrame.h | 3 --- js/src/jit/BaselineFrameInfo.cpp | 5 +++-- js/src/jit/BaselineFrameInfo.h | 6 ++---- js/src/jit/BaselineIC.cpp | 2 -- js/src/jit/BytecodeAnalysis.cpp | 2 +- js/src/jit/BytecodeAnalysis.h | 1 + js/src/jit/C1Spewer.cpp | 2 -- js/src/jit/CodeGenerator.cpp | 8 ++++---- js/src/jit/CodeGenerator.h | 5 ++++- js/src/jit/EdgeCaseAnalysis.cpp | 3 --- js/src/jit/EffectiveAddressAnalysis.cpp | 2 ++ js/src/jit/EffectiveAddressAnalysis.h | 5 ++--- js/src/jit/Ion.cpp | 13 ++----------- js/src/jit/Ion.h | 1 - js/src/jit/IonBuilder.cpp | 1 - js/src/jit/IonBuilder.h | 1 + js/src/jit/IonCaches.cpp | 2 -- js/src/jit/IonCaches.h | 1 - js/src/jit/IonFrames.cpp | 4 ++-- js/src/jit/IonFrames.h | 4 ---- js/src/jit/IonMacroAssembler.cpp | 6 ++++-- js/src/jit/IonMacroAssembler.h | 2 -- js/src/jit/IonSpewer.h | 9 +++++---- js/src/jit/LICM.cpp | 3 +-- js/src/jit/LICM.h | 8 +++----- js/src/jit/LIR.cpp | 3 +-- js/src/jit/LIR.h | 2 -- js/src/jit/LinearScan.cpp | 1 - js/src/jit/LinearScan.h | 1 - js/src/jit/LiveRangeAllocator.cpp | 3 +-- js/src/jit/Lowering.cpp | 1 - js/src/jit/Lowering.h | 2 -- js/src/jit/MIR.cpp | 2 -- js/src/jit/MIR.h | 2 +- js/src/jit/MIRGraph.cpp | 7 ++----- js/src/jit/MIRGraph.h | 1 - js/src/jit/ParallelFunctions.cpp | 1 - js/src/jit/ParallelSafetyAnalysis.cpp | 1 + js/src/jit/ParallelSafetyAnalysis.h | 1 - js/src/jit/PerfSpewer.cpp | 12 +++++++----- js/src/jit/PerfSpewer.h | 7 ++++--- js/src/jit/RangeAnalysis.cpp | 1 + js/src/jit/RangeAnalysis.h | 1 - js/src/jit/RegisterAllocator.h | 7 +++---- js/src/jit/Safepoints.cpp | 1 + js/src/jit/Safepoints.h | 3 +-- js/src/jit/Snapshots.cpp | 3 --- js/src/jit/TypeRepresentationSet.cpp | 2 -- js/src/jit/UnreachableCodeElimination.cpp | 1 + js/src/jit/UnreachableCodeElimination.h | 1 - js/src/jit/VMFunctions.cpp | 1 - js/src/jit/VMFunctions.h | 1 - js/src/jit/ValueNumbering.cpp | 5 ++--- js/src/jit/ValueNumbering.h | 2 -- js/src/jit/shared/Assembler-x86-shared.cpp | 9 ++++++++- js/src/jit/shared/BaselineCompiler-shared.h | 3 +-- js/src/jit/shared/BaselineIC-x86-shared.cpp | 3 --- js/src/jit/shared/CodeGenerator-shared.cpp | 1 + js/src/jit/shared/CodeGenerator-shared.h | 5 ++--- js/src/jit/shared/CodeGenerator-x86-shared.cpp | 1 - js/src/jit/shared/IonFrames-x86-shared.cpp | 1 - js/src/jit/shared/Lowering-shared-inl.h | 2 +- js/src/jit/shared/Lowering-shared.cpp | 1 - js/src/jit/shared/Lowering-shared.h | 1 - js/src/jit/shared/Lowering-x86-shared.cpp | 1 - js/src/jit/shared/MoveEmitter-x86-shared.h | 8 +++++++- js/src/jit/x64/Assembler-x64.cpp | 1 - js/src/jit/x64/Assembler-x64.h | 1 - js/src/jit/x64/Bailouts-x64.cpp | 1 - js/src/jit/x64/BaselineIC-x64.cpp | 3 --- js/src/jit/x64/CodeGenerator-x64.cpp | 2 +- js/src/jit/x64/CodeGenerator-x64.h | 1 - js/src/jit/x64/MacroAssembler-x64.cpp | 1 + js/src/jit/x64/Trampoline-x64.cpp | 4 ---- js/src/jit/x86/CodeGenerator-x86.cpp | 1 + js/src/jsapi-tests/testArgumentsObject.cpp | 1 - js/src/jsapi-tests/testBug604087.cpp | 2 +- js/src/jsapi-tests/testConservativeGC.cpp | 2 -- js/src/jsapi-tests/testErrorCopying.cpp | 2 -- js/src/jsapi-tests/testExternalStrings.cpp | 2 -- js/src/jsapi-tests/testFindSCCs.cpp | 3 --- js/src/jsapi-tests/testFuncCallback.cpp | 3 --- js/src/jsapi-tests/testGCFinalizeCallback.cpp | 3 --- js/src/jsapi-tests/testGCOutOfMemory.cpp | 2 -- js/src/jsapi-tests/testIntString.cpp | 1 - js/src/jsapi-tests/testNewObject.cpp | 2 -- js/src/jsapi-tests/testParseJSON.cpp | 2 -- js/src/jsapi-tests/testStructuredClone.cpp | 1 - js/src/jsapi-tests/tests.cpp | 2 -- js/src/jsapi-tests/tests.h | 2 -- js/src/jsweakcache.h | 3 ++- js/src/shell/jsheaptools.cpp | 2 -- js/src/vm/ArgumentsObject.h | 4 +++- js/src/vm/ForkJoin.h | 1 + js/src/vm/GlobalObject.cpp | 5 +++-- js/src/vm/GlobalObject.h | 2 -- js/src/vm/Interpreter-inl.h | 1 - js/src/vm/ObjectImpl.h | 1 - js/src/vm/OldDebugAPI.cpp | 1 - js/src/vm/Probes.h | 3 --- js/src/vm/ProxyObject.cpp | 2 -- js/src/vm/RegExpObject.h | 1 + js/src/vm/RegExpStatics.h | 4 +++- js/src/vm/Runtime-inl.h | 2 -- js/src/vm/Runtime.cpp | 1 + js/src/vm/Runtime.h | 14 ++++++++++---- js/src/yarr/YarrJIT.h | 3 +-- 132 files changed, 143 insertions(+), 233 deletions(-) diff --git a/js/public/CharacterEncoding.h b/js/public/CharacterEncoding.h index 21fcf1bcf51..7918b834840 100644 --- a/js/public/CharacterEncoding.h +++ b/js/public/CharacterEncoding.h @@ -10,10 +10,13 @@ #include "mozilla/NullPtr.h" #include "mozilla/Range.h" -#include "jspubtd.h" - +#include "js/TypeDecls.h" #include "js/Utility.h" +namespace js { +struct ThreadSafeContext; +} + namespace JS { /* diff --git a/js/src/assembler/assembler/MacroAssemblerCodeRef.h b/js/src/assembler/assembler/MacroAssemblerCodeRef.h index 16159f3f0e2..b92cddc05e2 100644 --- a/js/src/assembler/assembler/MacroAssemblerCodeRef.h +++ b/js/src/assembler/assembler/MacroAssemblerCodeRef.h @@ -30,6 +30,7 @@ #ifndef assembler_assembler_MacroAssemblerCodeRef_h #define assembler_assembler_MacroAssemblerCodeRef_h +#include "assembler/wtf/Assertions.h" #include "assembler/wtf/Platform.h" #include "assembler/jit/ExecutableAllocator.h" diff --git a/js/src/builtin/Intl.h b/js/src/builtin/Intl.h index e44bf612fa4..e44e8c37aab 100644 --- a/js/src/builtin/Intl.h +++ b/js/src/builtin/Intl.h @@ -9,8 +9,6 @@ #include "NamespaceImports.h" -#include "js/RootingAPI.h" - /* * The Intl module specified by standard ECMA-402, * ECMAScript Internationalization API Specification. diff --git a/js/src/builtin/Object.h b/js/src/builtin/Object.h index f49dfa69799..5e528f44aaa 100644 --- a/js/src/builtin/Object.h +++ b/js/src/builtin/Object.h @@ -7,7 +7,8 @@ #ifndef builtin_Object_h #define builtin_Object_h -#include "jsobj.h" +#include "jsapi.h" +#include "js/Value.h" namespace js { @@ -16,12 +17,12 @@ extern const JSFunctionSpec object_static_methods[]; // Object constructor native. Exposed only so the JIT can know its address. bool -obj_construct(JSContext *cx, unsigned argc, js::Value *vp); +obj_construct(JSContext *cx, unsigned argc, JS::Value *vp); #if JS_HAS_TOSOURCE // Object.prototype.toSource. Function.prototype.toSource and uneval use this. JSString * -ObjectToSource(JSContext *cx, HandleObject obj); +ObjectToSource(JSContext *cx, JS::HandleObject obj); #endif // JS_HAS_TOSOURCE } /* namespace js */ diff --git a/js/src/builtin/ParallelArray.h b/js/src/builtin/ParallelArray.h index 656509eef32..826b1adaeb6 100644 --- a/js/src/builtin/ParallelArray.h +++ b/js/src/builtin/ParallelArray.h @@ -9,8 +9,6 @@ #include "jsobj.h" -#include "jit/Ion.h" - namespace js { class ParallelArrayObject : public JSObject diff --git a/js/src/builtin/Profilers.cpp b/js/src/builtin/Profilers.cpp index 414b7bd44e8..1cd835cae87 100644 --- a/js/src/builtin/Profilers.cpp +++ b/js/src/builtin/Profilers.cpp @@ -11,12 +11,16 @@ #include #ifdef MOZ_CALLGRIND -#include +# include #endif #ifdef __APPLE__ -#include "devtools/Instruments.h" -#include "devtools/sharkctl.h" +#ifdef MOZ_INSTRUMENTS +# include "devtools/Instruments.h" +#endif +#ifdef MOZ_SHARK +# include "devtools/sharkctl.h" +#endif #endif #include "vm/Probes.h" diff --git a/js/src/ctypes/CTypes.cpp b/js/src/ctypes/CTypes.cpp index c0d432429a2..2666119b91a 100644 --- a/js/src/ctypes/CTypes.cpp +++ b/js/src/ctypes/CTypes.cpp @@ -31,13 +31,11 @@ #include #endif -#include "jscompartment.h" #include "jsnum.h" #include "jsprf.h" #include "builtin/TypeRepresentation.h" #include "ctypes/Library.h" -#include "vm/TypedArrayObject.h" using namespace std; diff --git a/js/src/ctypes/CTypes.h b/js/src/ctypes/CTypes.h index 4e5d5d86fbc..83f4f258835 100644 --- a/js/src/ctypes/CTypes.h +++ b/js/src/ctypes/CTypes.h @@ -7,10 +7,12 @@ #define ctypes_CTypes_h #include "ffi.h" -#include "jscntxt.h" +#include "jsalloc.h" #include "prlink.h" #include "js/HashTable.h" +#include "js/Vector.h" +#include "vm/String.h" namespace js { namespace ctypes { diff --git a/js/src/ctypes/Library.cpp b/js/src/ctypes/Library.cpp index 49af938666b..c1a7d1034ee 100644 --- a/js/src/ctypes/Library.cpp +++ b/js/src/ctypes/Library.cpp @@ -6,8 +6,6 @@ #include "ctypes/Library.h" -#include "jscntxt.h" -#include "jsstr.h" #include "prlink.h" #include "ctypes/CTypes.h" diff --git a/js/src/frontend/BytecodeEmitter.cpp b/js/src/frontend/BytecodeEmitter.cpp index 70051ba1b2d..a8e0f32853a 100644 --- a/js/src/frontend/BytecodeEmitter.cpp +++ b/js/src/frontend/BytecodeEmitter.cpp @@ -33,13 +33,11 @@ #include "vm/Debugger.h" #include "jsatominlines.h" -#include "jsfuninlines.h" #include "jsobjinlines.h" #include "jsscriptinlines.h" #include "frontend/ParseMaps-inl.h" #include "frontend/ParseNode-inl.h" -#include "vm/ScopeObject-inl.h" using namespace js; using namespace js::gc; diff --git a/js/src/frontend/ParseMaps.h b/js/src/frontend/ParseMaps.h index 55934c0e904..9e7f16fce4a 100644 --- a/js/src/frontend/ParseMaps.h +++ b/js/src/frontend/ParseMaps.h @@ -12,7 +12,6 @@ #include "ds/InlineMap.h" #include "gc/Barrier.h" -#include "js/HashTable.h" #include "js/Vector.h" class JSAtom; diff --git a/js/src/frontend/ParseNode.h b/js/src/frontend/ParseNode.h index 5e4b8c849c5..c128bc49b03 100644 --- a/js/src/frontend/ParseNode.h +++ b/js/src/frontend/ParseNode.h @@ -9,8 +9,6 @@ #include "mozilla/Attributes.h" -#include "jsscript.h" - #include "builtin/Module.h" #include "frontend/TokenStream.h" diff --git a/js/src/gc/Barrier.h b/js/src/gc/Barrier.h index 49145aa80b9..4a85e3fb44d 100644 --- a/js/src/gc/Barrier.h +++ b/js/src/gc/Barrier.h @@ -10,7 +10,9 @@ #include "NamespaceImports.h" #include "gc/Heap.h" -#include "gc/StoreBuffer.h" +#ifdef JSGC_GENERATIONAL +# include "gc/StoreBuffer.h" +#endif #include "js/HashTable.h" #include "js/Id.h" #include "js/RootingAPI.h" diff --git a/js/src/gc/FindSCCs.h b/js/src/gc/FindSCCs.h index 2ea8ca44233..e7a7e9d8eed 100644 --- a/js/src/gc/FindSCCs.h +++ b/js/src/gc/FindSCCs.h @@ -7,6 +7,7 @@ #ifndef gc_FindSCCs_h #define gc_FindSCCs_h +#include "jsfriendapi.h" #include "jsutil.h" namespace js { diff --git a/js/src/gc/Marking.cpp b/js/src/gc/Marking.cpp index 99f375df29f..e1b998acad7 100644 --- a/js/src/gc/Marking.cpp +++ b/js/src/gc/Marking.cpp @@ -17,7 +17,9 @@ #include "jscompartmentinlines.h" #include "jsinferinlines.h" -#include "gc/Nursery-inl.h" +#ifdef JSGC_GENERATIONAL +# include "gc/Nursery-inl.h" +#endif #include "vm/String-inl.h" using namespace js; diff --git a/js/src/gc/Marking.h b/js/src/gc/Marking.h index 6f70d8df43e..0d38e53dd64 100644 --- a/js/src/gc/Marking.h +++ b/js/src/gc/Marking.h @@ -8,7 +8,6 @@ #define gc_Marking_h #include "gc/Barrier.h" -#include "js/TypeDecls.h" class JSAtom; class JSLinearString; diff --git a/js/src/gc/RootMarking.cpp b/js/src/gc/RootMarking.cpp index 0eeb3c6f839..e2b0b503709 100644 --- a/js/src/gc/RootMarking.cpp +++ b/js/src/gc/RootMarking.cpp @@ -4,7 +4,6 @@ * 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/DebugOnly.h" #include "mozilla/Util.h" #ifdef MOZ_VALGRIND @@ -23,7 +22,6 @@ #include "gc/GCInternals.h" #include "gc/Marking.h" #ifdef JS_ION -# include "jit/IonFrameIterator.h" # include "jit/IonMacroAssembler.h" #endif #include "js/HashTable.h" diff --git a/js/src/jit/AsmJS.cpp b/js/src/jit/AsmJS.cpp index d4da6b2614b..69f2d4522fe 100644 --- a/js/src/jit/AsmJS.cpp +++ b/js/src/jit/AsmJS.cpp @@ -16,6 +16,7 @@ #include "jsworkers.h" #include "prmjtime.h" +#include "assembler/assembler/MacroAssembler.h" #include "frontend/Parser.h" #include "jit/AsmJSLink.h" #include "jit/AsmJSModule.h" diff --git a/js/src/jit/AsmJSModule.h b/js/src/jit/AsmJSModule.h index e2697efe2ba..d03edfa0646 100644 --- a/js/src/jit/AsmJSModule.h +++ b/js/src/jit/AsmJSModule.h @@ -18,6 +18,7 @@ #include "jit/IonMacroAssembler.h" #include "jit/PerfSpewer.h" #include "jit/RegisterSets.h" +#include "vm/TypedArrayObject.h" namespace js { @@ -405,7 +406,7 @@ class AsmJSModule perfProfiledBlocksFunctions_[i].trace(trc); #endif if (maybeHeap_) - MarkObject(trc, &maybeHeap_, "asm.js heap"); + gc::MarkObject(trc, &maybeHeap_, "asm.js heap"); if (globalArgumentName_) MarkStringUnbarriered(trc, &globalArgumentName_, "asm.js global argument name"); diff --git a/js/src/jit/BacktrackingAllocator.cpp b/js/src/jit/BacktrackingAllocator.cpp index 508c5aad19e..0eeb7041e81 100644 --- a/js/src/jit/BacktrackingAllocator.cpp +++ b/js/src/jit/BacktrackingAllocator.cpp @@ -5,8 +5,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "jit/BacktrackingAllocator.h" - #include "jsprf.h" +#include "jit/BitSet.h" using namespace js; using namespace js::jit; diff --git a/js/src/jit/BaselineBailouts.cpp b/js/src/jit/BaselineBailouts.cpp index 15ffdf81266..b5b1ee0b91b 100644 --- a/js/src/jit/BaselineBailouts.cpp +++ b/js/src/jit/BaselineBailouts.cpp @@ -4,14 +4,12 @@ * 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 "jit/BaselineCompiler.h" #include "jit/BaselineIC.h" #include "jit/BaselineJIT.h" #include "jit/CompileInfo.h" #include "jit/IonSpewer.h" #include "vm/ArgumentsObject.h" -#include "jsfuninlines.h" #include "jsscriptinlines.h" #include "jit/IonFrames-inl.h" diff --git a/js/src/jit/BaselineCompiler.cpp b/js/src/jit/BaselineCompiler.cpp index 11c17ec9e5f..5e4c60badb0 100644 --- a/js/src/jit/BaselineCompiler.cpp +++ b/js/src/jit/BaselineCompiler.cpp @@ -12,7 +12,6 @@ #include "jit/FixedList.h" #include "jit/IonLinker.h" #include "jit/IonSpewer.h" -#include "jit/PerfSpewer.h" #include "jit/VMFunctions.h" #include "jsscriptinlines.h" diff --git a/js/src/jit/BaselineCompiler.h b/js/src/jit/BaselineCompiler.h index 37de65aa1aa..5371c021bca 100644 --- a/js/src/jit/BaselineCompiler.h +++ b/js/src/jit/BaselineCompiler.h @@ -9,12 +9,7 @@ #ifdef JS_ION -#include "jit/BaselineIC.h" -#include "jit/BaselineJIT.h" -#include "jit/BytecodeAnalysis.h" #include "jit/FixedList.h" -#include "jit/IonAllocPolicy.h" -#include "jit/IonCode.h" #if defined(JS_CPU_X86) # include "jit/x86/BaselineCompiler-x86.h" #elif defined(JS_CPU_X64) diff --git a/js/src/jit/BaselineFrame-inl.h b/js/src/jit/BaselineFrame-inl.h index fcebffa5462..8d107515a4a 100644 --- a/js/src/jit/BaselineFrame-inl.h +++ b/js/src/jit/BaselineFrame-inl.h @@ -14,7 +14,6 @@ #include "jscntxt.h" #include "jscompartment.h" -#include "jit/IonFrames.h" #include "vm/ScopeObject.h" namespace js { diff --git a/js/src/jit/BaselineFrame.cpp b/js/src/jit/BaselineFrame.cpp index 2368fcf9459..325c1c4a2d7 100644 --- a/js/src/jit/BaselineFrame.cpp +++ b/js/src/jit/BaselineFrame.cpp @@ -6,7 +6,6 @@ #include "jit/BaselineFrame-inl.h" -#include "jit/BaselineIC.h" #include "jit/BaselineJIT.h" #include "jit/Ion.h" #include "vm/Debugger.h" diff --git a/js/src/jit/BaselineFrame.h b/js/src/jit/BaselineFrame.h index 1b9043e2671..ef727473333 100644 --- a/js/src/jit/BaselineFrame.h +++ b/js/src/jit/BaselineFrame.h @@ -9,9 +9,6 @@ #ifdef JS_ION -#include "jscntxt.h" -#include "jscompartment.h" - #include "jit/IonFrames.h" #include "vm/Stack.h" diff --git a/js/src/jit/BaselineFrameInfo.cpp b/js/src/jit/BaselineFrameInfo.cpp index d24b739a9dc..3d67ea55e48 100644 --- a/js/src/jit/BaselineFrameInfo.cpp +++ b/js/src/jit/BaselineFrameInfo.cpp @@ -6,8 +6,9 @@ #include "jit/BaselineFrameInfo.h" -#include "jit/IonSpewer.h" -#include "jit/shared/BaselineCompiler-shared.h" +#ifdef DEBUG +# include "jit/BytecodeAnalysis.h" +#endif using namespace js; using namespace js::jit; diff --git a/js/src/jit/BaselineFrameInfo.h b/js/src/jit/BaselineFrameInfo.h index 55119bb28bb..466f832b6c6 100644 --- a/js/src/jit/BaselineFrameInfo.h +++ b/js/src/jit/BaselineFrameInfo.h @@ -12,15 +12,15 @@ #include "mozilla/Alignment.h" #include "jit/BaselineFrame.h" -#include "jit/BaselineJIT.h" #include "jit/BaselineRegisters.h" -#include "jit/BytecodeAnalysis.h" #include "jit/FixedList.h" #include "jit/IonMacroAssembler.h" namespace js { namespace jit { +struct BytecodeInfo; + // FrameInfo overview. // // FrameInfo is used by the compiler to track values stored in the frame. This @@ -160,8 +160,6 @@ class StackValue enum StackAdjustment { AdjustStack, DontAdjustStack }; -class BaselineCompilerShared; - class FrameInfo { RootedScript script; diff --git a/js/src/jit/BaselineIC.cpp b/js/src/jit/BaselineIC.cpp index 04da2d6db88..629b37c5d9f 100644 --- a/js/src/jit/BaselineIC.cpp +++ b/js/src/jit/BaselineIC.cpp @@ -10,13 +10,11 @@ #include "jslibmath.h" #include "builtin/Eval.h" -#include "jit/BaselineCompiler.h" #include "jit/BaselineHelpers.h" #include "jit/BaselineJIT.h" #include "jit/IonLinker.h" #include "jit/IonSpewer.h" #include "jit/Lowering.h" -#include "jit/PerfSpewer.h" #include "jit/VMFunctions.h" #include "jsboolinlines.h" diff --git a/js/src/jit/BytecodeAnalysis.cpp b/js/src/jit/BytecodeAnalysis.cpp index e7dd8a55bd8..726652b5575 100644 --- a/js/src/jit/BytecodeAnalysis.cpp +++ b/js/src/jit/BytecodeAnalysis.cpp @@ -7,7 +7,7 @@ #include "jit/BytecodeAnalysis.h" #include "jsopcode.h" - +#include "jit/IonSpewer.h" #include "jsopcodeinlines.h" using namespace js; diff --git a/js/src/jit/BytecodeAnalysis.h b/js/src/jit/BytecodeAnalysis.h index 275a6753e0b..40dc454dd6a 100644 --- a/js/src/jit/BytecodeAnalysis.h +++ b/js/src/jit/BytecodeAnalysis.h @@ -7,6 +7,7 @@ #ifndef jit_BytecodeAnalysis_h #define jit_BytecodeAnalysis_h +#include "jsscript.h" #include "jit/IonAllocPolicy.h" #include "js/Vector.h" diff --git a/js/src/jit/C1Spewer.cpp b/js/src/jit/C1Spewer.cpp index 4f9bda52496..b9fd612467d 100644 --- a/js/src/jit/C1Spewer.cpp +++ b/js/src/jit/C1Spewer.cpp @@ -10,8 +10,6 @@ #include -#include "jit/Ion.h" -#include "jit/IonBuilder.h" #include "jit/LinearScan.h" #include "jit/LIR.h" #include "jit/MIRGraph.h" diff --git a/js/src/jit/CodeGenerator.cpp b/js/src/jit/CodeGenerator.cpp index c37ce363f47..5248d4b5dab 100644 --- a/js/src/jit/CodeGenerator.cpp +++ b/js/src/jit/CodeGenerator.cpp @@ -9,7 +9,6 @@ #include "mozilla/Assertions.h" #include "mozilla/Attributes.h" #include "mozilla/DebugOnly.h" -#include "mozilla/Util.h" #include "jslibmath.h" #include "jsmath.h" @@ -17,16 +16,17 @@ #include "builtin/Eval.h" #include "builtin/TypedObject.h" -#include "gc/Nursery.h" +#ifdef JSGC_GENERATIONAL +# include "gc/Nursery.h" +#endif #include "jit/ExecutionModeInlines.h" +#include "jit/IonCaches.h" #include "jit/IonLinker.h" #include "jit/IonSpewer.h" -#include "jit/Lowering.h" #include "jit/MIRGenerator.h" #include "jit/MoveEmitter.h" #include "jit/ParallelFunctions.h" #include "jit/ParallelSafetyAnalysis.h" -#include "jit/PerfSpewer.h" #include "jit/RangeAnalysis.h" #include "vm/ForkJoin.h" diff --git a/js/src/jit/CodeGenerator.h b/js/src/jit/CodeGenerator.h index 3ac83418c47..7c60076b269 100644 --- a/js/src/jit/CodeGenerator.h +++ b/js/src/jit/CodeGenerator.h @@ -7,7 +7,10 @@ #ifndef jit_CodeGenerator_h #define jit_CodeGenerator_h -#include "jit/PerfSpewer.h" +#include "jit/IonCaches.h" +#if defined(JS_ION_PERF) +# include "jit/PerfSpewer.h" +#endif #if defined(JS_CPU_X86) # include "jit/x86/CodeGenerator-x86.h" diff --git a/js/src/jit/EdgeCaseAnalysis.cpp b/js/src/jit/EdgeCaseAnalysis.cpp index 159d963402e..2e83b1fc0cb 100644 --- a/js/src/jit/EdgeCaseAnalysis.cpp +++ b/js/src/jit/EdgeCaseAnalysis.cpp @@ -6,9 +6,6 @@ #include "jit/EdgeCaseAnalysis.h" -#include "jit/Ion.h" -#include "jit/IonBuilder.h" -#include "jit/IonSpewer.h" #include "jit/MIR.h" #include "jit/MIRGraph.h" diff --git a/js/src/jit/EffectiveAddressAnalysis.cpp b/js/src/jit/EffectiveAddressAnalysis.cpp index 9d39fe12a39..ac47916bfc3 100644 --- a/js/src/jit/EffectiveAddressAnalysis.cpp +++ b/js/src/jit/EffectiveAddressAnalysis.cpp @@ -5,6 +5,8 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "jit/EffectiveAddressAnalysis.h" +#include "jit/MIR.h" +#include "jit/MIRGraph.h" using namespace js; using namespace jit; diff --git a/js/src/jit/EffectiveAddressAnalysis.h b/js/src/jit/EffectiveAddressAnalysis.h index 2775744c797..f678d6aa4a1 100644 --- a/js/src/jit/EffectiveAddressAnalysis.h +++ b/js/src/jit/EffectiveAddressAnalysis.h @@ -7,12 +7,11 @@ #ifndef jit_EffectiveAddressAnalysis_h #define jit_EffectiveAddressAnalysis_h -#include "jit/MIR.h" -#include "jit/MIRGraph.h" - namespace js { namespace jit { +class MIRGraph; + class EffectiveAddressAnalysis { MIRGraph &graph_; diff --git a/js/src/jit/Ion.cpp b/js/src/jit/Ion.cpp index 8288e572e70..24377892adf 100644 --- a/js/src/jit/Ion.cpp +++ b/js/src/jit/Ion.cpp @@ -17,37 +17,28 @@ #include "gc/Marking.h" #include "jit/AliasAnalysis.h" #include "jit/AsmJSModule.h" -#include "jit/AsmJSSignalHandlers.h" #include "jit/BacktrackingAllocator.h" -#include "jit/BaselineCompiler.h" +#include "jit/BaselineFrame.h" #include "jit/BaselineInspector.h" #include "jit/BaselineJIT.h" #include "jit/CodeGenerator.h" -#include "jit/CompilerRoot.h" #include "jit/EdgeCaseAnalysis.h" #include "jit/EffectiveAddressAnalysis.h" #include "jit/ExecutionModeInlines.h" #include "jit/IonAnalysis.h" #include "jit/IonBuilder.h" #include "jit/IonCompartment.h" -#include "jit/IonLinker.h" #include "jit/IonSpewer.h" #include "jit/LICM.h" #include "jit/LinearScan.h" #include "jit/LIR.h" +#include "jit/Lowering.h" #include "jit/ParallelSafetyAnalysis.h" #include "jit/PerfSpewer.h" #include "jit/RangeAnalysis.h" #include "jit/StupidAllocator.h" #include "jit/UnreachableCodeElimination.h" #include "jit/ValueNumbering.h" -#if defined(JS_CPU_X86) -# include "jit/x86/Lowering-x86.h" -#elif defined(JS_CPU_X64) -# include "jit/x64/Lowering-x64.h" -#elif defined(JS_CPU_ARM) -# include "jit/arm/Lowering-arm.h" -#endif #include "vm/ForkJoin.h" #include "jscompartmentinlines.h" diff --git a/js/src/jit/Ion.h b/js/src/jit/Ion.h index 7fb836f4c8b..fdfdf987e55 100644 --- a/js/src/jit/Ion.h +++ b/js/src/jit/Ion.h @@ -15,7 +15,6 @@ #include "jscompartment.h" #include "jit/CompileInfo.h" -#include "jit/IonCode.h" namespace js { namespace jit { diff --git a/js/src/jit/IonBuilder.cpp b/js/src/jit/IonBuilder.cpp index 5e7b19ba4e5..0454a0112ac 100644 --- a/js/src/jit/IonBuilder.cpp +++ b/js/src/jit/IonBuilder.cpp @@ -18,7 +18,6 @@ #include "jit/BaselineInspector.h" #include "jit/ExecutionModeInlines.h" #include "jit/Ion.h" -#include "jit/IonAnalysis.h" #include "jit/IonSpewer.h" #include "jit/Lowering.h" #include "jit/MIRGraph.h" diff --git a/js/src/jit/IonBuilder.h b/js/src/jit/IonBuilder.h index fcbb061edb8..b0728d49142 100644 --- a/js/src/jit/IonBuilder.h +++ b/js/src/jit/IonBuilder.h @@ -14,6 +14,7 @@ #include "jit/BytecodeAnalysis.h" #include "jit/MIR.h" +#include "jit/MIRGenerator.h" #include "jit/MIRGraph.h" #include "jit/TypeRepresentationSet.h" diff --git a/js/src/jit/IonCaches.cpp b/js/src/jit/IonCaches.cpp index 1ea5e4e8c1b..ae4629b7078 100644 --- a/js/src/jit/IonCaches.cpp +++ b/js/src/jit/IonCaches.cpp @@ -11,12 +11,10 @@ #include "jsproxy.h" #include "builtin/TypeRepresentation.h" -#include "jit/CodeGenerator.h" #include "jit/Ion.h" #include "jit/IonLinker.h" #include "jit/IonSpewer.h" #include "jit/Lowering.h" -#include "jit/PerfSpewer.h" #include "jit/VMFunctions.h" #include "vm/Shape.h" diff --git a/js/src/jit/IonCaches.h b/js/src/jit/IonCaches.h index 826f917e19e..fb6d0be666e 100644 --- a/js/src/jit/IonCaches.h +++ b/js/src/jit/IonCaches.h @@ -10,7 +10,6 @@ #ifdef JS_CPU_ARM # include "jit/arm/Assembler-arm.h" #endif -#include "jit/IonCode.h" #include "jit/Registers.h" #include "jit/shared/Assembler-shared.h" diff --git a/js/src/jit/IonFrames.cpp b/js/src/jit/IonFrames.cpp index 145b64b574b..94ee1572d12 100644 --- a/js/src/jit/IonFrames.cpp +++ b/js/src/jit/IonFrames.cpp @@ -18,14 +18,14 @@ #include "jit/IonCompartment.h" #include "jit/IonMacroAssembler.h" #include "jit/IonSpewer.h" +#include "jit/ParallelFunctions.h" #include "jit/PcScriptCache.h" #include "jit/Safepoints.h" #include "jit/SnapshotReader.h" #include "jit/VMFunctions.h" +#include "vm/ForkJoin.h" #include "vm/Interpreter.h" -#include "jsfuninlines.h" - #include "jit/IonFrameIterator-inl.h" #include "vm/Probes-inl.h" diff --git a/js/src/jit/IonFrames.h b/js/src/jit/IonFrames.h index c0be812a7ff..3f2ab105d12 100644 --- a/js/src/jit/IonFrames.h +++ b/js/src/jit/IonFrames.h @@ -13,12 +13,8 @@ #include "jscntxt.h" #include "jsfun.h" -#include "jstypes.h" -#include "jsutil.h" -#include "jit/IonCode.h" #include "jit/IonFrameIterator.h" -#include "jit/Registers.h" namespace js { namespace jit { diff --git a/js/src/jit/IonMacroAssembler.cpp b/js/src/jit/IonMacroAssembler.cpp index 3c602f3a635..d46894ce97a 100644 --- a/js/src/jit/IonMacroAssembler.cpp +++ b/js/src/jit/IonMacroAssembler.cpp @@ -14,12 +14,14 @@ #include "jit/BaselineFrame.h" #include "jit/BaselineIC.h" #include "jit/BaselineJIT.h" -#include "jit/BaselineRegisters.h" #include "jit/Lowering.h" #include "jit/MIR.h" +#include "jit/ParallelFunctions.h" #include "vm/ForkJoin.h" -#include "jsgcinlines.h" +#ifdef JSGC_GENERATIONAL +# include "jsgcinlines.h" +#endif #include "jsinferinlines.h" using namespace js; diff --git a/js/src/jit/IonMacroAssembler.h b/js/src/jit/IonMacroAssembler.h index 6586d3da3b0..c45419117ee 100644 --- a/js/src/jit/IonMacroAssembler.h +++ b/js/src/jit/IonMacroAssembler.h @@ -20,11 +20,9 @@ #endif #include "jit/IonCompartment.h" #include "jit/IonInstrumentation.h" -#include "jit/ParallelFunctions.h" #include "jit/VMFunctions.h" #include "vm/ProxyObject.h" #include "vm/Shape.h" -#include "vm/TypedArrayObject.h" namespace js { namespace jit { diff --git a/js/src/jit/IonSpewer.h b/js/src/jit/IonSpewer.h index 7add55bd8de..07df98d23a6 100644 --- a/js/src/jit/IonSpewer.h +++ b/js/src/jit/IonSpewer.h @@ -13,6 +13,7 @@ #include "jit/C1Spewer.h" #include "jit/JSONSpewer.h" +#include "js/RootingAPI.h" namespace js { namespace jit { @@ -94,7 +95,7 @@ class IonSpewer { private: MIRGraph *graph; - HandleScript function; + JS::HandleScript function; C1Spewer c1Spewer; JSONSpewer jsonSpewer; bool inited_; @@ -108,14 +109,14 @@ class IonSpewer ~IonSpewer(); bool init(); - void beginFunction(MIRGraph *graph, HandleScript); + void beginFunction(MIRGraph *graph, JS::HandleScript); bool isSpewingFunction() const; void spewPass(const char *pass); void spewPass(const char *pass, LinearScanAllocator *ra); void endFunction(); }; -void IonSpewNewFunction(MIRGraph *graph, HandleScript function); +void IonSpewNewFunction(MIRGraph *graph, JS::HandleScript function); void IonSpewPass(const char *pass); void IonSpewPass(const char *pass, LinearScanAllocator *ra); void IonSpewEndFunction(); @@ -138,7 +139,7 @@ void EnableIonDebugLogging(); #else -static inline void IonSpewNewFunction(MIRGraph *graph, HandleScript function) +static inline void IonSpewNewFunction(MIRGraph *graph, JS::HandleScript function) { } static inline void IonSpewPass(const char *pass) { } diff --git a/js/src/jit/LICM.cpp b/js/src/jit/LICM.cpp index 49458baa121..4f491639994 100644 --- a/js/src/jit/LICM.cpp +++ b/js/src/jit/LICM.cpp @@ -8,10 +8,9 @@ #include -#include "jit/Ion.h" -#include "jit/IonBuilder.h" #include "jit/IonSpewer.h" #include "jit/MIR.h" +#include "jit/MIRGenerator.h" #include "jit/MIRGraph.h" using namespace js; diff --git a/js/src/jit/LICM.h b/js/src/jit/LICM.h index 8d561fe3c8b..afd5cce1fdc 100644 --- a/js/src/jit/LICM.h +++ b/js/src/jit/LICM.h @@ -7,16 +7,14 @@ #ifndef jit_LICM_h #define jit_LICM_h -#include "jit/IonAllocPolicy.h" -#include "jit/IonAnalysis.h" -#include "jit/MIR.h" -#include "jit/MIRGraph.h" - // This file represents the Loop Invariant Code Motion optimization pass namespace js { namespace jit { +class MIRGenerator; +class MIRGraph; + class LICM { MIRGenerator *mir; diff --git a/js/src/jit/LIR.cpp b/js/src/jit/LIR.cpp index b453e31fa18..008ba9b1402 100644 --- a/js/src/jit/LIR.cpp +++ b/js/src/jit/LIR.cpp @@ -12,8 +12,7 @@ #include "jit/IonSpewer.h" #include "jit/MIR.h" -#include "jit/MIRGraph.h" -#include "jit/shared/CodeGenerator-shared.h" +#include "jit/MIRGenerator.h" using namespace js; using namespace js::jit; diff --git a/js/src/jit/LIR.h b/js/src/jit/LIR.h index 7e7d36d9440..23465a194b9 100644 --- a/js/src/jit/LIR.h +++ b/js/src/jit/LIR.h @@ -20,8 +20,6 @@ #include "jit/MIRGraph.h" #include "jit/Registers.h" #include "jit/Safepoints.h" -#include "jit/shared/Assembler-shared.h" -#include "jit/VMFunctions.h" namespace js { namespace jit { diff --git a/js/src/jit/LinearScan.cpp b/js/src/jit/LinearScan.cpp index 5919a2ed715..f65659f206b 100644 --- a/js/src/jit/LinearScan.cpp +++ b/js/src/jit/LinearScan.cpp @@ -9,7 +9,6 @@ #include "mozilla/DebugOnly.h" #include "jit/BitSet.h" -#include "jit/IonBuilder.h" #include "jit/IonSpewer.h" using namespace js; diff --git a/js/src/jit/LinearScan.h b/js/src/jit/LinearScan.h index f93f8acefd5..a97ae35363d 100644 --- a/js/src/jit/LinearScan.h +++ b/js/src/jit/LinearScan.h @@ -7,7 +7,6 @@ #ifndef jit_LinearScan_h #define jit_LinearScan_h -#include "jit/BitSet.h" #include "jit/LiveRangeAllocator.h" #include "js/Vector.h" diff --git a/js/src/jit/LiveRangeAllocator.cpp b/js/src/jit/LiveRangeAllocator.cpp index e824c5ea9fb..89dacfc0bd0 100644 --- a/js/src/jit/LiveRangeAllocator.cpp +++ b/js/src/jit/LiveRangeAllocator.cpp @@ -5,10 +5,9 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "jit/LiveRangeAllocator.h" - #include "mozilla/DebugOnly.h" - #include "jit/BacktrackingAllocator.h" +#include "jit/BitSet.h" #include "jit/LinearScan.h" using namespace js; diff --git a/js/src/jit/Lowering.cpp b/js/src/jit/Lowering.cpp index 695fc8530fc..3a895444c4c 100644 --- a/js/src/jit/Lowering.cpp +++ b/js/src/jit/Lowering.cpp @@ -14,7 +14,6 @@ #include "jit/LIR.h" #include "jit/MIR.h" #include "jit/MIRGraph.h" -#include "jit/RangeAnalysis.h" #include "jsinferinlines.h" diff --git a/js/src/jit/Lowering.h b/js/src/jit/Lowering.h index 6d6cb42c6ea..936bdba49e9 100644 --- a/js/src/jit/Lowering.h +++ b/js/src/jit/Lowering.h @@ -10,9 +10,7 @@ // This file declares the structures that are used for attaching LIR to a // MIRGraph. -#include "jit/IonAllocPolicy.h" #include "jit/LIR.h" -#include "jit/MOpcodes.h" #if defined(JS_CPU_X86) # include "jit/x86/Lowering-x86.h" #elif defined(JS_CPU_X64) diff --git a/js/src/jit/MIR.cpp b/js/src/jit/MIR.cpp index a0258248c2f..6d86679c60b 100644 --- a/js/src/jit/MIR.cpp +++ b/js/src/jit/MIR.cpp @@ -14,10 +14,8 @@ #include "jsstr.h" #include "jit/BaselineInspector.h" -#include "jit/EdgeCaseAnalysis.h" #include "jit/IonBuilder.h" #include "jit/IonSpewer.h" -#include "jit/LICM.h" // For LinearSum #include "jit/MIRGraph.h" #include "jit/RangeAnalysis.h" diff --git a/js/src/jit/MIR.h b/js/src/jit/MIR.h index 798006597eb..e05646a42ce 100644 --- a/js/src/jit/MIR.h +++ b/js/src/jit/MIR.h @@ -16,7 +16,6 @@ #include "jsinfer.h" -#include "jit/Bailouts.h" #include "jit/CompilerRoot.h" #include "jit/FixedList.h" #include "jit/InlineList.h" @@ -26,6 +25,7 @@ #include "jit/TypePolicy.h" #include "jit/TypeRepresentationSet.h" #include "vm/ScopeObject.h" +#include "vm/TypedArrayObject.h" namespace js { diff --git a/js/src/jit/MIRGraph.cpp b/js/src/jit/MIRGraph.cpp index c898289f877..92b000a430e 100644 --- a/js/src/jit/MIRGraph.cpp +++ b/js/src/jit/MIRGraph.cpp @@ -6,15 +6,12 @@ #include "jit/MIRGraph.h" -#include "jsanalyze.h" - #include "jit/AsmJS.h" +#include "jit/BytecodeAnalysis.h" #include "jit/Ion.h" -#include "jit/IonBuilder.h" #include "jit/IonSpewer.h" #include "jit/MIR.h" - -#include "jsinferinlines.h" +#include "jit/MIRGenerator.h" using namespace js; using namespace js::jit; diff --git a/js/src/jit/MIRGraph.h b/js/src/jit/MIRGraph.h index a253743bdb6..0933c438c0a 100644 --- a/js/src/jit/MIRGraph.h +++ b/js/src/jit/MIRGraph.h @@ -13,7 +13,6 @@ #include "jit/FixedList.h" #include "jit/IonAllocPolicy.h" #include "jit/MIR.h" -#include "jit/MIRGenerator.h" namespace js { namespace jit { diff --git a/js/src/jit/ParallelFunctions.cpp b/js/src/jit/ParallelFunctions.cpp index eec0aecb84d..e8b0a57a0bc 100644 --- a/js/src/jit/ParallelFunctions.cpp +++ b/js/src/jit/ParallelFunctions.cpp @@ -6,7 +6,6 @@ #include "jit/ParallelFunctions.h" -#include "jit/IonSpewer.h" #include "vm/ArrayObject.h" #include "jsgcinlines.h" diff --git a/js/src/jit/ParallelSafetyAnalysis.cpp b/js/src/jit/ParallelSafetyAnalysis.cpp index 23a8eda47f2..56addc9323e 100644 --- a/js/src/jit/ParallelSafetyAnalysis.cpp +++ b/js/src/jit/ParallelSafetyAnalysis.cpp @@ -10,6 +10,7 @@ #include "jit/IonAnalysis.h" #include "jit/IonSpewer.h" #include "jit/MIR.h" +#include "jit/MIRGenerator.h" #include "jit/MIRGraph.h" #include "jit/UnreachableCodeElimination.h" diff --git a/js/src/jit/ParallelSafetyAnalysis.h b/js/src/jit/ParallelSafetyAnalysis.h index 3e68d6faacc..a03e7346db8 100644 --- a/js/src/jit/ParallelSafetyAnalysis.h +++ b/js/src/jit/ParallelSafetyAnalysis.h @@ -7,7 +7,6 @@ #ifndef jit_ParallelSafetyAnalysis_h #define jit_ParallelSafetyAnalysis_h -#include "jit/CompileInfo.h" #include "jit/MIR.h" namespace js { diff --git a/js/src/jit/PerfSpewer.cpp b/js/src/jit/PerfSpewer.cpp index cbc29bf2ce0..a4428d31fce 100644 --- a/js/src/jit/PerfSpewer.cpp +++ b/js/src/jit/PerfSpewer.cpp @@ -10,11 +10,13 @@ # include #endif -#include "jit/IonSpewer.h" -#include "jit/LinearScan.h" -#include "jit/LIR.h" -#include "jit/MIR.h" -#include "jit/MIRGraph.h" +#ifdef JS_ION_PERF +# include "jit/IonSpewer.h" +# include "jit/LinearScan.h" +# include "jit/LIR.h" +# include "jit/MIR.h" +# include "jit/MIRGraph.h" +#endif // perf expects its data to be in a file /tmp/perf-PID.map, but for Android // and B2G the map files are written to /data/local/tmp/perf-PID.map diff --git a/js/src/jit/PerfSpewer.h b/js/src/jit/PerfSpewer.h index 4ccae260917..84218d494a0 100644 --- a/js/src/jit/PerfSpewer.h +++ b/js/src/jit/PerfSpewer.h @@ -7,9 +7,10 @@ #ifndef jit_PerfSpewer_h #define jit_PerfSpewer_h -#include - -#include "jit/IonMacroAssembler.h" +#ifdef JS_ION_PERF +# include +# include "jit/IonMacroAssembler.h" +#endif namespace js { namespace jit { diff --git a/js/src/jit/RangeAnalysis.cpp b/js/src/jit/RangeAnalysis.cpp index f5ecc6a5e45..b0c1586095b 100644 --- a/js/src/jit/RangeAnalysis.cpp +++ b/js/src/jit/RangeAnalysis.cpp @@ -14,6 +14,7 @@ #include "jit/IonAnalysis.h" #include "jit/IonSpewer.h" #include "jit/MIR.h" +#include "jit/MIRGenerator.h" #include "jit/MIRGraph.h" #include "vm/NumericConversions.h" diff --git a/js/src/jit/RangeAnalysis.h b/js/src/jit/RangeAnalysis.h index d835a7b00bd..dc53337fb12 100644 --- a/js/src/jit/RangeAnalysis.h +++ b/js/src/jit/RangeAnalysis.h @@ -10,7 +10,6 @@ #include "mozilla/FloatingPoint.h" #include "mozilla/MathAlgorithms.h" -#include "jit/CompileInfo.h" #include "jit/IonAnalysis.h" #include "jit/MIR.h" diff --git a/js/src/jit/RegisterAllocator.h b/js/src/jit/RegisterAllocator.h index 4f37e2577dd..c4332fcd483 100644 --- a/js/src/jit/RegisterAllocator.h +++ b/js/src/jit/RegisterAllocator.h @@ -9,11 +9,8 @@ #include "mozilla/Attributes.h" -#include "jit/InlineList.h" -#include "jit/Ion.h" #include "jit/LIR.h" -#include "jit/Lowering.h" -#include "jit/MIR.h" +#include "jit/MIRGenerator.h" #include "jit/MIRGraph.h" // Generic structures and functions for use by register allocators. @@ -21,6 +18,8 @@ namespace js { namespace jit { +class LIRGenerator; + // Structure for running a liveness analysis on a finished register allocation. // This analysis can be used for two purposes: // diff --git a/js/src/jit/Safepoints.cpp b/js/src/jit/Safepoints.cpp index e1a927b2407..ef0039aa871 100644 --- a/js/src/jit/Safepoints.cpp +++ b/js/src/jit/Safepoints.cpp @@ -8,6 +8,7 @@ #include "mozilla/MathAlgorithms.h" +#include "jit/BitSet.h" #include "jit/IonSpewer.h" #include "jit/LIR.h" diff --git a/js/src/jit/Safepoints.h b/js/src/jit/Safepoints.h index 6ed35de36dc..d8d488a07d0 100644 --- a/js/src/jit/Safepoints.h +++ b/js/src/jit/Safepoints.h @@ -7,14 +7,13 @@ #ifndef jit_Safepoints_h #define jit_Safepoints_h -#include "jit/BitSet.h" #include "jit/CompactBuffer.h" -#include "jit/Registers.h" #include "jit/shared/Assembler-shared.h" namespace js { namespace jit { +class BitSet; struct SafepointNunboxEntry; class LAllocation; class LSafepoint; diff --git a/js/src/jit/Snapshots.cpp b/js/src/jit/Snapshots.cpp index 42e052db3ef..a7e7cc01392 100644 --- a/js/src/jit/Snapshots.cpp +++ b/js/src/jit/Snapshots.cpp @@ -6,14 +6,11 @@ #include "jsscript.h" -#include "jit/IonFrames.h" -#include "jit/IonLinker.h" #include "jit/IonSpewer.h" #ifdef TRACK_SNAPSHOTS #include "jit/LIR.h" #include "jit/MIR.h" #endif -#include "jit/MIRGenerator.h" #include "jit/SnapshotReader.h" #include "jit/SnapshotWriter.h" diff --git a/js/src/jit/TypeRepresentationSet.cpp b/js/src/jit/TypeRepresentationSet.cpp index 458dc1c4775..d8e447ece1c 100644 --- a/js/src/jit/TypeRepresentationSet.cpp +++ b/js/src/jit/TypeRepresentationSet.cpp @@ -10,8 +10,6 @@ #include "jit/IonBuilder.h" -#include "jsinferinlines.h" - using namespace js; using namespace jit; diff --git a/js/src/jit/UnreachableCodeElimination.cpp b/js/src/jit/UnreachableCodeElimination.cpp index 4862d580b80..ba89e677562 100644 --- a/js/src/jit/UnreachableCodeElimination.cpp +++ b/js/src/jit/UnreachableCodeElimination.cpp @@ -8,6 +8,7 @@ #include "jit/AliasAnalysis.h" #include "jit/IonAnalysis.h" +#include "jit/MIRGenerator.h" #include "jit/ValueNumbering.h" using namespace js; diff --git a/js/src/jit/UnreachableCodeElimination.h b/js/src/jit/UnreachableCodeElimination.h index 1f81b56beb9..03fb64cf97c 100644 --- a/js/src/jit/UnreachableCodeElimination.h +++ b/js/src/jit/UnreachableCodeElimination.h @@ -7,7 +7,6 @@ #ifndef jit_UnreachableCodeElimination_h #define jit_UnreachableCodeElimination_h -#include "jit/MIR.h" #include "jit/MIRGraph.h" namespace js { diff --git a/js/src/jit/VMFunctions.cpp b/js/src/jit/VMFunctions.cpp index 618c6a94547..210ecfd2a2c 100644 --- a/js/src/jit/VMFunctions.cpp +++ b/js/src/jit/VMFunctions.cpp @@ -10,7 +10,6 @@ #include "builtin/TypedObject.h" #include "frontend/BytecodeCompiler.h" #include "jit/BaselineIC.h" -#include "jit/Ion.h" #include "jit/IonCompartment.h" #include "jit/IonFrames.h" #include "vm/ArrayObject.h" diff --git a/js/src/jit/VMFunctions.h b/js/src/jit/VMFunctions.h index 2516ea28e75..90aa78b1ac3 100644 --- a/js/src/jit/VMFunctions.h +++ b/js/src/jit/VMFunctions.h @@ -10,7 +10,6 @@ #include "jspubtd.h" #include "jit/CompileInfo.h" -#include "jit/Ion.h" #include "jit/IonFrames.h" namespace js { diff --git a/js/src/jit/ValueNumbering.cpp b/js/src/jit/ValueNumbering.cpp index 225a236928d..3be1ab2ded6 100644 --- a/js/src/jit/ValueNumbering.cpp +++ b/js/src/jit/ValueNumbering.cpp @@ -6,10 +6,9 @@ #include "jit/ValueNumbering.h" -#include "jit/CompileInfo.h" -#include "jit/Ion.h" -#include "jit/IonBuilder.h" #include "jit/IonSpewer.h" +#include "jit/MIRGenerator.h" +#include "jit/MIRGraph.h" using namespace js; using namespace js::jit; diff --git a/js/src/jit/ValueNumbering.h b/js/src/jit/ValueNumbering.h index 8dad9e83eb2..6225f258add 100644 --- a/js/src/jit/ValueNumbering.h +++ b/js/src/jit/ValueNumbering.h @@ -7,9 +7,7 @@ #ifndef jit_ValueNumbering_h #define jit_ValueNumbering_h -#include "jit/CompileInfo.h" #include "jit/MIR.h" -#include "jit/MIRGraph.h" namespace js { namespace jit { diff --git a/js/src/jit/shared/Assembler-x86-shared.cpp b/js/src/jit/shared/Assembler-x86-shared.cpp index 5d1625d64e2..6eeed695ed4 100644 --- a/js/src/jit/shared/Assembler-x86-shared.cpp +++ b/js/src/jit/shared/Assembler-x86-shared.cpp @@ -5,7 +5,14 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "gc/Marking.h" -#include "jit/IonMacroAssembler.h" +#include "jit/IonCompartment.h" +#if defined(JS_CPU_X86) +# include "jit/x86/MacroAssembler-x86.h" +#elif defined(JS_CPU_X64) +# include "jit/x64/MacroAssembler-x64.h" +#elif defined(JS_CPU_ARM) +# include "jit/arm/MacroAssembler-arm.h" +#endif using namespace js; using namespace js::jit; diff --git a/js/src/jit/shared/BaselineCompiler-shared.h b/js/src/jit/shared/BaselineCompiler-shared.h index 3d6dedbf2ce..2a39d8bdc63 100644 --- a/js/src/jit/shared/BaselineCompiler-shared.h +++ b/js/src/jit/shared/BaselineCompiler-shared.h @@ -9,9 +9,8 @@ #include "jit/BaselineFrameInfo.h" #include "jit/BaselineIC.h" -#include "jit/IonInstrumentation.h" +#include "jit/BytecodeAnalysis.h" #include "jit/IonMacroAssembler.h" -#include "jit/IonSpewer.h" namespace js { namespace jit { diff --git a/js/src/jit/shared/BaselineIC-x86-shared.cpp b/js/src/jit/shared/BaselineIC-x86-shared.cpp index 097fad9fa6b..329f8aed16a 100644 --- a/js/src/jit/shared/BaselineIC-x86-shared.cpp +++ b/js/src/jit/shared/BaselineIC-x86-shared.cpp @@ -4,11 +4,8 @@ * 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 "jit/BaselineCompiler.h" #include "jit/BaselineHelpers.h" #include "jit/BaselineIC.h" -#include "jit/BaselineJIT.h" -#include "jit/IonLinker.h" using namespace js; using namespace js::jit; diff --git a/js/src/jit/shared/CodeGenerator-shared.cpp b/js/src/jit/shared/CodeGenerator-shared.cpp index 3f2710811be..01c0a34ee85 100644 --- a/js/src/jit/shared/CodeGenerator-shared.cpp +++ b/js/src/jit/shared/CodeGenerator-shared.cpp @@ -8,6 +8,7 @@ #include "mozilla/DebugOnly.h" +#include "jit/IonCaches.h" #include "jit/IonMacroAssembler.h" #include "jit/IonSpewer.h" #include "jit/MIR.h" diff --git a/js/src/jit/shared/CodeGenerator-shared.h b/js/src/jit/shared/CodeGenerator-shared.h index 65c23508403..2635f5d1853 100644 --- a/js/src/jit/shared/CodeGenerator-shared.h +++ b/js/src/jit/shared/CodeGenerator-shared.h @@ -8,17 +8,16 @@ #define jit_shared_CodeGenerator_shared_h #include "mozilla/Alignment.h" -#include "mozilla/Util.h" -#include "jit/IonCaches.h" #include "jit/IonFrames.h" #include "jit/IonMacroAssembler.h" #include "jit/LIR.h" -#include "jit/MIR.h" +#include "jit/MIRGenerator.h" #include "jit/MIRGraph.h" #include "jit/Safepoints.h" #include "jit/SnapshotWriter.h" #include "jit/VMFunctions.h" +#include "vm/ForkJoin.h" namespace js { namespace jit { diff --git a/js/src/jit/shared/CodeGenerator-x86-shared.cpp b/js/src/jit/shared/CodeGenerator-x86-shared.cpp index d15937d850c..9e744c19b70 100644 --- a/js/src/jit/shared/CodeGenerator-x86-shared.cpp +++ b/js/src/jit/shared/CodeGenerator-x86-shared.cpp @@ -11,7 +11,6 @@ #include "jit/IonCompartment.h" #include "jit/IonFrames.h" -#include "jit/ParallelFunctions.h" #include "jit/RangeAnalysis.h" #include "jit/shared/CodeGenerator-shared-inl.h" diff --git a/js/src/jit/shared/IonFrames-x86-shared.cpp b/js/src/jit/shared/IonFrames-x86-shared.cpp index 87bf52e855d..2069010b39c 100644 --- a/js/src/jit/shared/IonFrames-x86-shared.cpp +++ b/js/src/jit/shared/IonFrames-x86-shared.cpp @@ -4,7 +4,6 @@ * 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 "jit/Ion.h" #include "jit/IonFrames.h" using namespace js; diff --git a/js/src/jit/shared/Lowering-shared-inl.h b/js/src/jit/shared/Lowering-shared-inl.h index 1cbf12f5334..53e31e5ca91 100644 --- a/js/src/jit/shared/Lowering-shared-inl.h +++ b/js/src/jit/shared/Lowering-shared-inl.h @@ -10,7 +10,7 @@ #include "jit/shared/Lowering-shared.h" #include "jit/MIR.h" -#include "jit/MIRGraph.h" +#include "jit/MIRGenerator.h" namespace js { namespace jit { diff --git a/js/src/jit/shared/Lowering-shared.cpp b/js/src/jit/shared/Lowering-shared.cpp index 7fb154a1e7a..9cf111aa8e7 100644 --- a/js/src/jit/shared/Lowering-shared.cpp +++ b/js/src/jit/shared/Lowering-shared.cpp @@ -8,7 +8,6 @@ #include "jit/LIR.h" #include "jit/MIR.h" -#include "jit/MIRGraph.h" using namespace js; using namespace jit; diff --git a/js/src/jit/shared/Lowering-shared.h b/js/src/jit/shared/Lowering-shared.h index 4308de715b9..ce1bcc5ab99 100644 --- a/js/src/jit/shared/Lowering-shared.h +++ b/js/src/jit/shared/Lowering-shared.h @@ -10,7 +10,6 @@ // This file declares the structures that are used for attaching LIR to a // MIRGraph. -#include "jit/IonAllocPolicy.h" #include "jit/LIR.h" namespace js { diff --git a/js/src/jit/shared/Lowering-x86-shared.cpp b/js/src/jit/shared/Lowering-x86-shared.cpp index fb364fadd98..fb4774bbf9c 100644 --- a/js/src/jit/shared/Lowering-x86-shared.cpp +++ b/js/src/jit/shared/Lowering-x86-shared.cpp @@ -8,7 +8,6 @@ #include "mozilla/MathAlgorithms.h" -#include "jit/Lowering.h" #include "jit/MIR.h" #include "jit/shared/Lowering-shared-inl.h" diff --git a/js/src/jit/shared/MoveEmitter-x86-shared.h b/js/src/jit/shared/MoveEmitter-x86-shared.h index 6ed49ffd903..b7d8fe7446d 100644 --- a/js/src/jit/shared/MoveEmitter-x86-shared.h +++ b/js/src/jit/shared/MoveEmitter-x86-shared.h @@ -7,7 +7,13 @@ #ifndef jit_MoveEmitter_x86_shared_h #define jit_MoveEmitter_x86_shared_h -#include "jit/IonMacroAssembler.h" +#if defined(JS_CPU_X86) +# include "jit/x86/MacroAssembler-x86.h" +#elif defined(JS_CPU_X64) +# include "jit/x64/MacroAssembler-x64.h" +#elif defined(JS_CPU_ARM) +# include "jit/arm/MacroAssembler-arm.h" +#endif #include "jit/MoveResolver.h" namespace js { diff --git a/js/src/jit/x64/Assembler-x64.cpp b/js/src/jit/x64/Assembler-x64.cpp index 4b6c008cdfd..f92a623ca5b 100644 --- a/js/src/jit/x64/Assembler-x64.cpp +++ b/js/src/jit/x64/Assembler-x64.cpp @@ -7,7 +7,6 @@ #include "jit/x64/Assembler-x64.h" #include "gc/Marking.h" -#include "jit/LIR.h" using namespace js; using namespace js::jit; diff --git a/js/src/jit/x64/Assembler-x64.h b/js/src/jit/x64/Assembler-x64.h index 393a8051cdd..a2099ebbaec 100644 --- a/js/src/jit/x64/Assembler-x64.h +++ b/js/src/jit/x64/Assembler-x64.h @@ -9,7 +9,6 @@ #include "mozilla/Util.h" -#include "jit/CompactBuffer.h" #include "jit/IonCode.h" #include "jit/shared/Assembler-shared.h" diff --git a/js/src/jit/x64/Bailouts-x64.cpp b/js/src/jit/x64/Bailouts-x64.cpp index 53a9caca897..7f22e2c385d 100644 --- a/js/src/jit/x64/Bailouts-x64.cpp +++ b/js/src/jit/x64/Bailouts-x64.cpp @@ -5,7 +5,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "jit/Bailouts.h" -#include "jit/IonCompartment.h" using namespace js; using namespace js::jit; diff --git a/js/src/jit/x64/BaselineIC-x64.cpp b/js/src/jit/x64/BaselineIC-x64.cpp index a418de5cddd..3181d098fdc 100644 --- a/js/src/jit/x64/BaselineIC-x64.cpp +++ b/js/src/jit/x64/BaselineIC-x64.cpp @@ -4,11 +4,8 @@ * 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 "jit/BaselineCompiler.h" #include "jit/BaselineHelpers.h" #include "jit/BaselineIC.h" -#include "jit/BaselineJIT.h" -#include "jit/IonLinker.h" using namespace js; using namespace js::jit; diff --git a/js/src/jit/x64/CodeGenerator-x64.cpp b/js/src/jit/x64/CodeGenerator-x64.cpp index 8d8f7b408a1..4415c574999 100644 --- a/js/src/jit/x64/CodeGenerator-x64.cpp +++ b/js/src/jit/x64/CodeGenerator-x64.cpp @@ -6,8 +6,8 @@ #include "jit/x64/CodeGenerator-x64.h" +#include "jit/IonCaches.h" #include "jit/MIR.h" -#include "jit/MIRGraph.h" #include "jsscriptinlines.h" diff --git a/js/src/jit/x64/CodeGenerator-x64.h b/js/src/jit/x64/CodeGenerator-x64.h index 5831146391b..86abf4f522f 100644 --- a/js/src/jit/x64/CodeGenerator-x64.h +++ b/js/src/jit/x64/CodeGenerator-x64.h @@ -8,7 +8,6 @@ #define jit_x64_CodeGenerator_x64_h #include "jit/shared/CodeGenerator-x86-shared.h" -#include "jit/x64/Assembler-x64.h" namespace js { namespace jit { diff --git a/js/src/jit/x64/MacroAssembler-x64.cpp b/js/src/jit/x64/MacroAssembler-x64.cpp index b9b5d587e8a..725acc16d99 100644 --- a/js/src/jit/x64/MacroAssembler-x64.cpp +++ b/js/src/jit/x64/MacroAssembler-x64.cpp @@ -8,6 +8,7 @@ #include "jit/Bailouts.h" #include "jit/BaselineFrame.h" +#include "jit/IonCompartment.h" #include "jit/IonFrames.h" #include "jit/MoveEmitter.h" diff --git a/js/src/jit/x64/Trampoline-x64.cpp b/js/src/jit/x64/Trampoline-x64.cpp index 87427a18bce..64f1e0cfa3b 100644 --- a/js/src/jit/x64/Trampoline-x64.cpp +++ b/js/src/jit/x64/Trampoline-x64.cpp @@ -4,14 +4,10 @@ * 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 "assembler/assembler/MacroAssembler.h" #include "jit/Bailouts.h" -#include "jit/ExecutionModeInlines.h" #include "jit/IonCompartment.h" #include "jit/IonFrames.h" #include "jit/IonLinker.h" -#include "jit/IonSpewer.h" -#include "jit/PerfSpewer.h" #include "jit/VMFunctions.h" #include "jit/x64/BaselineHelpers-x64.h" diff --git a/js/src/jit/x86/CodeGenerator-x86.cpp b/js/src/jit/x86/CodeGenerator-x86.cpp index fbe8f2d159a..c1eb402846a 100644 --- a/js/src/jit/x86/CodeGenerator-x86.cpp +++ b/js/src/jit/x86/CodeGenerator-x86.cpp @@ -11,6 +11,7 @@ #include "jsnum.h" #include "jit/ExecutionModeInlines.h" +#include "jit/IonCaches.h" #include "jit/MIR.h" #include "jit/MIRGraph.h" #include "vm/Shape.h" diff --git a/js/src/jsapi-tests/testArgumentsObject.cpp b/js/src/jsapi-tests/testArgumentsObject.cpp index 1211892d37b..869bce97e90 100644 --- a/js/src/jsapi-tests/testArgumentsObject.cpp +++ b/js/src/jsapi-tests/testArgumentsObject.cpp @@ -8,7 +8,6 @@ #include "jsapi-tests/tests.h" #include "vm/ArgumentsObject-inl.h" -#include "vm/Stack-inl.h" using namespace js; diff --git a/js/src/jsapi-tests/testBug604087.cpp b/js/src/jsapi-tests/testBug604087.cpp index 03fb1a5612f..778c5e1fb4c 100644 --- a/js/src/jsapi-tests/testBug604087.cpp +++ b/js/src/jsapi-tests/testBug604087.cpp @@ -12,7 +12,7 @@ #include "jsapi-tests/tests.h" -#include "jsobjinlines.h" +#include "vm/ProxyObject.h" struct OuterWrapper : js::Wrapper { diff --git a/js/src/jsapi-tests/testConservativeGC.cpp b/js/src/jsapi-tests/testConservativeGC.cpp index 3d4dea46f7f..0a6bcf44606 100644 --- a/js/src/jsapi-tests/testConservativeGC.cpp +++ b/js/src/jsapi-tests/testConservativeGC.cpp @@ -9,8 +9,6 @@ #include "jsapi-tests/tests.h" #include "vm/String.h" -#include "jsobjinlines.h" - BEGIN_TEST(testConservativeGC) { JS::RootedValue v2(cx); diff --git a/js/src/jsapi-tests/testErrorCopying.cpp b/js/src/jsapi-tests/testErrorCopying.cpp index e249229bc92..fb5ffcf43b7 100644 --- a/js/src/jsapi-tests/testErrorCopying.cpp +++ b/js/src/jsapi-tests/testErrorCopying.cpp @@ -8,8 +8,6 @@ * 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 "jsapi-tests/tests.h" static uint32_t column = 0; diff --git a/js/src/jsapi-tests/testExternalStrings.cpp b/js/src/jsapi-tests/testExternalStrings.cpp index 9394b408249..f5cafcbff6a 100644 --- a/js/src/jsapi-tests/testExternalStrings.cpp +++ b/js/src/jsapi-tests/testExternalStrings.cpp @@ -5,8 +5,6 @@ #include "mozilla/PodOperations.h" #include "mozilla/Util.h" -#include "jsutil.h" - #include "jsapi-tests/tests.h" using mozilla::ArrayLength; diff --git a/js/src/jsapi-tests/testFindSCCs.cpp b/js/src/jsapi-tests/testFindSCCs.cpp index 29c509ea1b8..b09cb9b7759 100644 --- a/js/src/jsapi-tests/testFindSCCs.cpp +++ b/js/src/jsapi-tests/testFindSCCs.cpp @@ -8,9 +8,6 @@ #include #include -#include "jscntxt.h" -#include "jsgc.h" - #include "gc/FindSCCs.h" #include "jsapi-tests/tests.h" diff --git a/js/src/jsapi-tests/testFuncCallback.cpp b/js/src/jsapi-tests/testFuncCallback.cpp index 75465f6ccd5..15d110daf52 100644 --- a/js/src/jsapi-tests/testFuncCallback.cpp +++ b/js/src/jsapi-tests/testFuncCallback.cpp @@ -2,9 +2,6 @@ * 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 "jsfun.h" - #include "jsapi-tests/tests.h" #ifdef MOZ_TRACE_JSCALLS diff --git a/js/src/jsapi-tests/testGCFinalizeCallback.cpp b/js/src/jsapi-tests/testGCFinalizeCallback.cpp index 9ff35cc6084..06e2d201bfb 100644 --- a/js/src/jsapi-tests/testGCFinalizeCallback.cpp +++ b/js/src/jsapi-tests/testGCFinalizeCallback.cpp @@ -2,9 +2,6 @@ * 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 "jsfriendapi.h" - #include "jsapi-tests/tests.h" const unsigned BufferSize = 20; diff --git a/js/src/jsapi-tests/testGCOutOfMemory.cpp b/js/src/jsapi-tests/testGCOutOfMemory.cpp index 86af248d7f4..d7a14fafbcc 100644 --- a/js/src/jsapi-tests/testGCOutOfMemory.cpp +++ b/js/src/jsapi-tests/testGCOutOfMemory.cpp @@ -6,8 +6,6 @@ * Contributor: Igor Bukanov */ -#include "jscntxt.h" - #include "jsapi-tests/tests.h" static unsigned errorCount = 0; diff --git a/js/src/jsapi-tests/testIntString.cpp b/js/src/jsapi-tests/testIntString.cpp index 112c277f373..a03f45080d1 100644 --- a/js/src/jsapi-tests/testIntString.cpp +++ b/js/src/jsapi-tests/testIntString.cpp @@ -6,7 +6,6 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "jsapi-tests/tests.h" -#include "vm/String.h" BEGIN_TEST(testIntString_bug515273) { diff --git a/js/src/jsapi-tests/testNewObject.cpp b/js/src/jsapi-tests/testNewObject.cpp index 7beaa70060f..207cd2297b0 100644 --- a/js/src/jsapi-tests/testNewObject.cpp +++ b/js/src/jsapi-tests/testNewObject.cpp @@ -5,8 +5,6 @@ * 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 "jsfriendapi.h" - #include "jsapi-tests/tests.h" const size_t N = 1000; diff --git a/js/src/jsapi-tests/testParseJSON.cpp b/js/src/jsapi-tests/testParseJSON.cpp index 1b0106c73df..6e8d9ce5a52 100644 --- a/js/src/jsapi-tests/testParseJSON.cpp +++ b/js/src/jsapi-tests/testParseJSON.cpp @@ -6,12 +6,10 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include -#include #include "jsstr.h" #include "jsapi-tests/tests.h" -#include "vm/String.h" using namespace js; diff --git a/js/src/jsapi-tests/testStructuredClone.cpp b/js/src/jsapi-tests/testStructuredClone.cpp index af0b7cf9d03..e6060098106 100644 --- a/js/src/jsapi-tests/testStructuredClone.cpp +++ b/js/src/jsapi-tests/testStructuredClone.cpp @@ -2,7 +2,6 @@ * 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 "jsfriendapi.h" #include "js/StructuredClone.h" #include "jsapi-tests/tests.h" diff --git a/js/src/jsapi-tests/tests.cpp b/js/src/jsapi-tests/tests.cpp index 78874679fde..a0895038ece 100644 --- a/js/src/jsapi-tests/tests.cpp +++ b/js/src/jsapi-tests/tests.cpp @@ -8,8 +8,6 @@ #include -#include "jsobj.h" - #include "js/RootingAPI.h" JSAPITest *JSAPITest::list; diff --git a/js/src/jsapi-tests/tests.h b/js/src/jsapi-tests/tests.h index df9676af1a9..a1053249d5f 100644 --- a/js/src/jsapi-tests/tests.h +++ b/js/src/jsapi-tests/tests.h @@ -7,8 +7,6 @@ #ifndef jsapi_tests_tests_h #define jsapi_tests_tests_h -#include "mozilla/Util.h" - #include #include #include diff --git a/js/src/jsweakcache.h b/js/src/jsweakcache.h index 9ad9e82ca9b..93629acd252 100644 --- a/js/src/jsweakcache.h +++ b/js/src/jsweakcache.h @@ -7,9 +7,10 @@ #ifndef jsweakcache_h #define jsweakcache_h +#include "jscntxt.h" #include "gc/Marking.h" - #include "js/HashTable.h" +#include "vm/Runtime.h" namespace js { diff --git a/js/src/shell/jsheaptools.cpp b/js/src/shell/jsheaptools.cpp index 182f5ed8501..33f0bd105e7 100644 --- a/js/src/shell/jsheaptools.cpp +++ b/js/src/shell/jsheaptools.cpp @@ -14,10 +14,8 @@ #include "jsapi.h" #include "jscntxt.h" #include "jscompartment.h" -#include "jsfun.h" #include "jsobj.h" #include "jsprf.h" -#include "jsutil.h" #include "jsobjinlines.h" diff --git a/js/src/vm/ArgumentsObject.h b/js/src/vm/ArgumentsObject.h index 9e4e79c52ce..29fb8cb6767 100644 --- a/js/src/vm/ArgumentsObject.h +++ b/js/src/vm/ArgumentsObject.h @@ -9,7 +9,9 @@ #include "mozilla/MemoryReporting.h" -#include "jsfun.h" +#include "jsobj.h" + +#include "gc/Barrier.h" namespace js { diff --git a/js/src/vm/ForkJoin.h b/js/src/vm/ForkJoin.h index d0c5f8348d4..8a981742cfb 100644 --- a/js/src/vm/ForkJoin.h +++ b/js/src/vm/ForkJoin.h @@ -10,6 +10,7 @@ #include "jscntxt.h" #include "jit/Ion.h" +#include "jit/MIR.h" /////////////////////////////////////////////////////////////////////////// // Read Me First diff --git a/js/src/vm/GlobalObject.cpp b/js/src/vm/GlobalObject.cpp index f9b702230e7..5e501648d0f 100644 --- a/js/src/vm/GlobalObject.cpp +++ b/js/src/vm/GlobalObject.cpp @@ -15,14 +15,15 @@ #include "jsweakmap.h" #include "builtin/Eval.h" -#include "builtin/Intl.h" +#if EXPOSE_INTL_API +# include "builtin/Intl.h" +#endif #include "builtin/MapObject.h" #include "builtin/Object.h" #include "builtin/RegExp.h" #include "vm/RegExpStatics.h" #include "jscompartmentinlines.h" -#include "jsfuninlines.h" #include "jsobjinlines.h" #include "jsscriptinlines.h" diff --git a/js/src/vm/GlobalObject.h b/js/src/vm/GlobalObject.h index e008ebcee32..6b302c599f2 100644 --- a/js/src/vm/GlobalObject.h +++ b/js/src/vm/GlobalObject.h @@ -7,8 +7,6 @@ #ifndef vm_GlobalObject_h #define vm_GlobalObject_h -#include "mozilla/DebugOnly.h" - #include "jsarray.h" #include "jsbool.h" #include "jsexn.h" diff --git a/js/src/vm/Interpreter-inl.h b/js/src/vm/Interpreter-inl.h index 4e4b4fb079c..120763c60d7 100644 --- a/js/src/vm/Interpreter-inl.h +++ b/js/src/vm/Interpreter-inl.h @@ -15,7 +15,6 @@ #include "jsstr.h" #include "jit/Ion.h" -#include "jit/IonCompartment.h" #include "vm/ArgumentsObject.h" #include "vm/ForkJoin.h" diff --git a/js/src/vm/ObjectImpl.h b/js/src/vm/ObjectImpl.h index 236f2e56596..bb59b17ab33 100644 --- a/js/src/vm/ObjectImpl.h +++ b/js/src/vm/ObjectImpl.h @@ -8,7 +8,6 @@ #define vm_ObjectImpl_h #include "mozilla/Assertions.h" -#include "mozilla/GuardObjects.h" #include diff --git a/js/src/vm/OldDebugAPI.cpp b/js/src/vm/OldDebugAPI.cpp index 4cc8fe20791..c74886735b8 100644 --- a/js/src/vm/OldDebugAPI.cpp +++ b/js/src/vm/OldDebugAPI.cpp @@ -27,7 +27,6 @@ #include "frontend/SourceNotes.h" #include "jit/AsmJSModule.h" #include "vm/Debugger.h" -#include "vm/Interpreter.h" #include "vm/Shape.h" #include "jsatominlines.h" diff --git a/js/src/vm/Probes.h b/js/src/vm/Probes.h index af3f7676534..0122c8a5ba9 100644 --- a/js/src/vm/Probes.h +++ b/js/src/vm/Probes.h @@ -11,9 +11,6 @@ #include "javascript-trace.h" #endif -#include "jsobj.h" -#include "jspubtd.h" - #include "vm/Stack.h" namespace js { diff --git a/js/src/vm/ProxyObject.cpp b/js/src/vm/ProxyObject.cpp index c9739abae3e..8fe0b457f7d 100644 --- a/js/src/vm/ProxyObject.cpp +++ b/js/src/vm/ProxyObject.cpp @@ -6,8 +6,6 @@ #include "vm/ProxyObject.h" -#include "jscompartment.h" - #include "jsgcinlines.h" using namespace js; diff --git a/js/src/vm/RegExpObject.h b/js/src/vm/RegExpObject.h index 444e8f8f33a..d33abab56d2 100644 --- a/js/src/vm/RegExpObject.h +++ b/js/src/vm/RegExpObject.h @@ -11,6 +11,7 @@ #include "mozilla/MemoryReporting.h" #include "jscntxt.h" +#include "jsproxy.h" #include "gc/Marking.h" #if ENABLE_YARR_JIT diff --git a/js/src/vm/RegExpStatics.h b/js/src/vm/RegExpStatics.h index f0ed6024e38..89846392f6e 100644 --- a/js/src/vm/RegExpStatics.h +++ b/js/src/vm/RegExpStatics.h @@ -8,12 +8,14 @@ #define vm_RegExpStatics_h #include "gc/Marking.h" -#include "vm/GlobalObject.h" #include "vm/MatchPairs.h" +#include "vm/RegExpObject.h" #include "vm/Runtime.h" namespace js { +class GlobalObject; + class RegExpStatics { /* The latest RegExp output, set after execution. */ diff --git a/js/src/vm/Runtime-inl.h b/js/src/vm/Runtime-inl.h index a12b5890fe6..f1aa1feac9b 100644 --- a/js/src/vm/Runtime-inl.h +++ b/js/src/vm/Runtime-inl.h @@ -10,9 +10,7 @@ #include "vm/Runtime.h" #include "jscompartment.h" -#include "jsworkers.h" -#include "jit/IonFrames.h" #include "vm/Probes.h" #include "jsgcinlines.h" diff --git a/js/src/vm/Runtime.cpp b/js/src/vm/Runtime.cpp index cbf9095e8c0..8b26c5c61dc 100644 --- a/js/src/vm/Runtime.cpp +++ b/js/src/vm/Runtime.cpp @@ -25,6 +25,7 @@ #include "jswatchpoint.h" #include "jswrapper.h" +#include "assembler/assembler/MacroAssembler.h" #include "jit/AsmJSSignalHandlers.h" #include "jit/IonCompartment.h" #include "jit/PcScriptCache.h" diff --git a/js/src/vm/Runtime.h b/js/src/vm/Runtime.h index 0b3f6629396..acf747406af 100644 --- a/js/src/vm/Runtime.h +++ b/js/src/vm/Runtime.h @@ -19,16 +19,22 @@ #include "jsatom.h" #include "jsclist.h" #include "jsgc.h" -#include "jsproxy.h" +#ifdef DEBUG +# include "jsproxy.h" +#endif #include "jsscript.h" #include "ds/FixedSizeHash.h" #include "frontend/ParseMaps.h" -#include "gc/Nursery.h" +#ifdef JSGC_GENERATIONAL +# include "gc/Nursery.h" +#endif #include "gc/Statistics.h" -#include "gc/StoreBuffer.h" +#ifdef JSGC_GENERATIONAL +# include "gc/StoreBuffer.h" +#endif #ifdef XP_MACOSX -#include "jit/AsmJSSignalHandlers.h" +# include "jit/AsmJSSignalHandlers.h" #endif #include "js/HashTable.h" #include "js/Vector.h" diff --git a/js/src/yarr/YarrJIT.h b/js/src/yarr/YarrJIT.h index 4c1a6e9aaf5..667b51aeb45 100644 --- a/js/src/yarr/YarrJIT.h +++ b/js/src/yarr/YarrJIT.h @@ -32,11 +32,10 @@ #if ENABLE_YARR_JIT -#include "assembler/assembler/MacroAssembler.h" +#include "assembler/assembler/MacroAssemblerCodeRef.h" #include "yarr/MatchResult.h" #include "yarr/Yarr.h" -#include "yarr/YarrPattern.h" #if WTF_CPU_X86 && !WTF_COMPILER_MSVC && !WTF_COMPILER_SUNCC #define YARR_CALL __attribute__ ((regparm (3)))