# HG changeset patch # User Jason Orendorff # Date 1518464324 21600 # Node ID 212a88df0f3d598edf04df824d568667c20c5fec # Parent adf8d9693a8cacd4cbbd6df58259ffa6b54500b4 Bug 1429206 - Part 6: Rename jscompartment* -> vm/JSCompartment*. r=jandem. diff --git a/js/src/builtin/TypedObject.cpp b/js/src/builtin/TypedObject.cpp --- a/js/src/builtin/TypedObject.cpp +++ b/js/src/builtin/TypedObject.cpp @@ -4,23 +4,23 @@ * 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 "builtin/TypedObject-inl.h" #include "mozilla/Casting.h" #include "mozilla/CheckedInt.h" -#include "jscompartment.h" #include "jsutil.h" #include "builtin/SIMD.h" #include "gc/Marking.h" #include "js/Vector.h" #include "vm/GlobalObject.h" +#include "vm/JSCompartment.h" #include "vm/JSFunction.h" #include "vm/String.h" #include "vm/StringBuffer.h" #include "vm/TypedArrayObject.h" #include "gc/Nursery-inl.h" #include "gc/StoreBuffer-inl.h" #include "vm/JSObject-inl.h" diff --git a/js/src/frontend/TokenStream.cpp b/js/src/frontend/TokenStream.cpp --- a/js/src/frontend/TokenStream.cpp +++ b/js/src/frontend/TokenStream.cpp @@ -14,26 +14,26 @@ #include "mozilla/ScopeExit.h" #include #include #include #include #include "jscntxt.h" -#include "jscompartment.h" #include "jsexn.h" #include "jsnum.h" #include "frontend/BytecodeCompiler.h" #include "frontend/Parser.h" #include "frontend/ReservedWords.h" #include "js/CharacterEncoding.h" #include "js/UniquePtr.h" #include "vm/HelperThreads.h" +#include "vm/JSCompartment.h" #include "vm/StringBuffer.h" #include "vm/Unicode.h" using mozilla::ArrayLength; using mozilla::MakeScopeExit; using mozilla::Maybe; using mozilla::PodArrayZero; using mozilla::PodAssign; diff --git a/js/src/gc/AtomMarking-inl.h b/js/src/gc/AtomMarking-inl.h --- a/js/src/gc/AtomMarking-inl.h +++ b/js/src/gc/AtomMarking-inl.h @@ -1,17 +1,17 @@ /* -*- 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 "gc/AtomMarking.h" -#include "jscompartment.h" +#include "vm/JSCompartment.h" #include "gc/Heap-inl.h" namespace js { namespace gc { inline size_t GetAtomBit(TenuredCell* thing) diff --git a/js/src/gc/AtomMarking.cpp b/js/src/gc/AtomMarking.cpp --- a/js/src/gc/AtomMarking.cpp +++ b/js/src/gc/AtomMarking.cpp @@ -1,17 +1,17 @@ /* -*- 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 "gc/AtomMarking-inl.h" -#include "jscompartment.h" +#include "vm/JSCompartment.h" #include "jsgcinlines.h" #include "gc/Heap-inl.h" namespace js { namespace gc { // Atom Marking Overview diff --git a/js/src/gc/Barrier.cpp b/js/src/gc/Barrier.cpp --- a/js/src/gc/Barrier.cpp +++ b/js/src/gc/Barrier.cpp @@ -1,24 +1,23 @@ /* -*- 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 "gc/Barrier.h" -#include "jscompartment.h" - #include "builtin/TypedObject.h" #include "gc/Policy.h" #include "gc/Zone.h" #include "js/HashTable.h" #include "js/Value.h" #include "vm/EnvironmentObject.h" +#include "vm/JSCompartment.h" #include "vm/JSObject.h" #include "vm/SharedArrayObject.h" #include "vm/Symbol.h" #include "wasm/WasmJS.h" namespace js { bool diff --git a/js/src/gc/Iteration.cpp b/js/src/gc/Iteration.cpp --- a/js/src/gc/Iteration.cpp +++ b/js/src/gc/Iteration.cpp @@ -3,20 +3,19 @@ * 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 "gc/Iteration-inl.h" #include "mozilla/DebugOnly.h" -#include "jscompartment.h" - #include "gc/GCInternals.h" #include "js/HashTable.h" +#include "vm/JSCompartment.h" #include "vm/Runtime.h" #include "jscntxtinlines.h" #include "jsgcinlines.h" using namespace js; using namespace js::gc; diff --git a/js/src/gc/Marking.cpp b/js/src/gc/Marking.cpp --- a/js/src/gc/Marking.cpp +++ b/js/src/gc/Marking.cpp @@ -28,21 +28,21 @@ #include "vm/RegExpShared.h" #include "vm/Scope.h" #include "vm/Shape.h" #include "vm/Symbol.h" #include "vm/TypedArrayObject.h" #include "vm/UnboxedObject.h" #include "wasm/WasmJS.h" -#include "jscompartmentinlines.h" #include "jsgcinlines.h" #include "gc/Iteration-inl.h" #include "gc/Nursery-inl.h" +#include "vm/JSCompartment-inl.h" #include "vm/NativeObject-inl.h" #include "vm/String-inl.h" #include "vm/UnboxedObject-inl.h" using namespace js; using namespace js::gc; using JS::MapTypeToTraceKind; diff --git a/js/src/gc/Nursery.cpp b/js/src/gc/Nursery.cpp --- a/js/src/gc/Nursery.cpp +++ b/js/src/gc/Nursery.cpp @@ -7,28 +7,28 @@ #include "gc/Nursery-inl.h" #include "mozilla/DebugOnly.h" #include "mozilla/IntegerPrintfMacros.h" #include "mozilla/Move.h" #include "mozilla/Unused.h" -#include "jscompartment.h" #include "jsutil.h" +#include "gc/FreeOp.h" #include "gc/GCInternals.h" #include "gc/Memory.h" #include "jit/JitFrames.h" #include "vm/ArrayObject.h" #include "vm/Debugger.h" #if defined(DEBUG) #include "vm/EnvironmentObject.h" #endif -#include "gc/FreeOp.h" +#include "vm/JSCompartment.h" #include "vm/JSONPrinter.h" #include "vm/Time.h" #include "vm/TypedArrayObject.h" #include "vm/TypeInference.h" #include "gc/Marking-inl.h" #include "vm/NativeObject-inl.h" diff --git a/js/src/gc/Tracer.cpp b/js/src/gc/Tracer.cpp --- a/js/src/gc/Tracer.cpp +++ b/js/src/gc/Tracer.cpp @@ -15,19 +15,19 @@ #include "gc/GCInternals.h" #include "gc/Marking.h" #include "gc/Zone.h" #include "vm/JSFunction.h" #include "vm/JSScript.h" #include "vm/Shape.h" #include "vm/Symbol.h" -#include "jscompartmentinlines.h" #include "jsgcinlines.h" +#include "vm/JSCompartment-inl.h" #include "vm/ObjectGroup-inl.h" using namespace js; using namespace js::gc; using mozilla::DebugOnly; namespace js { template diff --git a/js/src/gc/Zone.cpp b/js/src/gc/Zone.cpp --- a/js/src/gc/Zone.cpp +++ b/js/src/gc/Zone.cpp @@ -8,19 +8,20 @@ #include "gc/Policy.h" #include "jit/BaselineJIT.h" #include "jit/Ion.h" #include "jit/JitCompartment.h" #include "vm/Debugger.h" #include "vm/Runtime.h" -#include "jscompartmentinlines.h" #include "jsgcinlines.h" + #include "gc/Marking-inl.h" +#include "vm/JSCompartment-inl.h" using namespace js; using namespace js::gc; Zone * const Zone::NotOnList = reinterpret_cast(1); JS::Zone::Zone(JSRuntime* rt, ZoneGroup* group) : JS::shadow::Zone(rt, &rt->gc.marker), diff --git a/js/src/jit/BaselineCacheIRCompiler.cpp b/js/src/jit/BaselineCacheIRCompiler.cpp --- a/js/src/jit/BaselineCacheIRCompiler.cpp +++ b/js/src/jit/BaselineCacheIRCompiler.cpp @@ -8,20 +8,20 @@ #include "jit/CacheIR.h" #include "jit/Linker.h" #include "jit/SharedICHelpers.h" #include "proxy/DeadObjectProxy.h" #include "proxy/Proxy.h" #include "jscntxtinlines.h" -#include "jscompartmentinlines.h" #include "jit/MacroAssembler-inl.h" #include "jit/SharedICHelpers-inl.h" +#include "vm/JSCompartment-inl.h" using namespace js; using namespace js::jit; using mozilla::Maybe; class AutoStubFrame; diff --git a/js/src/jit/BaselineFrame-inl.h b/js/src/jit/BaselineFrame-inl.h --- a/js/src/jit/BaselineFrame-inl.h +++ b/js/src/jit/BaselineFrame-inl.h @@ -5,19 +5,19 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef jit_BaselineFrame_inl_h #define jit_BaselineFrame_inl_h #include "jit/BaselineFrame.h" #include "jscntxt.h" -#include "jscompartment.h" #include "vm/EnvironmentObject.h" +#include "vm/JSCompartment.h" #include "vm/EnvironmentObject-inl.h" #include "vm/JSScript-inl.h" namespace js { namespace jit { template diff --git a/js/src/jit/BaselineIC.h b/js/src/jit/BaselineIC.h --- a/js/src/jit/BaselineIC.h +++ b/js/src/jit/BaselineIC.h @@ -5,27 +5,27 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef jit_BaselineIC_h #define jit_BaselineIC_h #include "mozilla/Assertions.h" #include "jscntxt.h" -#include "jscompartment.h" #include "jsopcode.h" #include "builtin/TypedObject.h" #include "gc/Barrier.h" #include "jit/BaselineICList.h" #include "jit/BaselineJIT.h" #include "jit/SharedIC.h" #include "jit/SharedICRegisters.h" #include "js/GCVector.h" #include "vm/ArrayObject.h" +#include "vm/JSCompartment.h" #include "vm/UnboxedObject.h" namespace js { namespace jit { // WarmUpCounter_Fallback // A WarmUpCounter IC chain has only the fallback stub. diff --git a/js/src/jit/BaselineJIT.h b/js/src/jit/BaselineJIT.h --- a/js/src/jit/BaselineJIT.h +++ b/js/src/jit/BaselineJIT.h @@ -5,22 +5,22 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef jit_BaselineJIT_h #define jit_BaselineJIT_h #include "mozilla/MemoryReporting.h" #include "jscntxt.h" -#include "jscompartment.h" #include "ds/LifoAlloc.h" #include "jit/Bailouts.h" #include "jit/IonCode.h" #include "jit/MacroAssembler.h" +#include "vm/JSCompartment.h" #include "vm/TraceLogging.h" namespace js { namespace jit { class StackValue; class BaselineICEntry; class ICStub; diff --git a/js/src/jit/CacheIRCompiler.cpp b/js/src/jit/CacheIRCompiler.cpp --- a/js/src/jit/CacheIRCompiler.cpp +++ b/js/src/jit/CacheIRCompiler.cpp @@ -5,19 +5,19 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "jit/CacheIRCompiler.h" #include "jit/IonIC.h" #include "jit/SharedICHelpers.h" #include "jsboolinlines.h" -#include "jscompartmentinlines.h" #include "jit/MacroAssembler-inl.h" +#include "vm/JSCompartment-inl.h" using namespace js; using namespace js::jit; using mozilla::Maybe; ValueOperand CacheRegisterAllocator::useValueRegister(MacroAssembler& masm, ValOperandId op) diff --git a/js/src/jit/CacheIRSpewer.cpp b/js/src/jit/CacheIRSpewer.cpp --- a/js/src/jit/CacheIRSpewer.cpp +++ b/js/src/jit/CacheIRSpewer.cpp @@ -17,18 +17,17 @@ #include #endif #include #include "vm/JSFunction.h" #include "vm/JSObject.h" #include "vm/JSScript.h" -#include "jscompartmentinlines.h" - +#include "vm/JSCompartment-inl.h" #include "vm/JSObject-inl.h" using namespace js; using namespace js::jit; CacheIRSpewer CacheIRSpewer::cacheIRspewer; CacheIRSpewer::CacheIRSpewer() diff --git a/js/src/jit/CompileWrappers.cpp b/js/src/jit/CompileWrappers.cpp --- a/js/src/jit/CompileWrappers.cpp +++ b/js/src/jit/CompileWrappers.cpp @@ -4,17 +4,17 @@ * 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 "jsgc.h" #include "jit/Ion.h" #include "jit/JitCompartment.h" -#include "jscompartmentinlines.h" +#include "vm/JSCompartment-inl.h" using namespace js; using namespace js::jit; JSRuntime* CompileRuntime::runtime() { return reinterpret_cast(this); diff --git a/js/src/jit/Ion.cpp b/js/src/jit/Ion.cpp --- a/js/src/jit/Ion.cpp +++ b/js/src/jit/Ion.cpp @@ -5,17 +5,16 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "jit/Ion.h" #include "mozilla/IntegerPrintfMacros.h" #include "mozilla/MemoryReporting.h" #include "mozilla/ThreadLocal.h" -#include "jscompartment.h" #include "jsprf.h" #include "gc/FreeOp.h" #include "gc/Marking.h" #include "jit/AliasAnalysis.h" #include "jit/AlignmentMaskAnalysis.h" #include "jit/BacktrackingAllocator.h" #include "jit/BaselineFrame.h" @@ -46,27 +45,27 @@ #include "jit/RangeAnalysis.h" #include "jit/ScalarReplacement.h" #include "jit/Sink.h" #include "jit/StupidAllocator.h" #include "jit/ValueNumbering.h" #include "jit/WasmBCE.h" #include "vm/Debugger.h" #include "vm/HelperThreads.h" +#include "vm/JSCompartment.h" #include "vm/TraceLogging.h" #include "vtune/VTuneWrapper.h" -#include "jscompartmentinlines.h" - #include "gc/Iteration-inl.h" #include "jit/JitFrames-inl.h" #include "jit/MacroAssembler-inl.h" #include "jit/shared/Lowering-shared-inl.h" #include "vm/Debugger-inl.h" #include "vm/EnvironmentObject-inl.h" +#include "vm/JSCompartment-inl.h" #include "vm/JSObject-inl.h" #include "vm/JSScript-inl.h" #include "vm/Stack-inl.h" using namespace js; using namespace js::jit; // Assert that JitCode is gc::Cell aligned. diff --git a/js/src/jit/Ion.h b/js/src/jit/Ion.h --- a/js/src/jit/Ion.h +++ b/js/src/jit/Ion.h @@ -6,20 +6,20 @@ #ifndef jit_Ion_h #define jit_Ion_h #include "mozilla/MemoryReporting.h" #include "mozilla/Result.h" #include "jscntxt.h" -#include "jscompartment.h" #include "jit/CompileWrappers.h" #include "jit/JitOptions.h" +#include "vm/JSCompartment.h" namespace js { namespace jit { class TempAllocator; enum MethodStatus { diff --git a/js/src/jit/IonCacheIRCompiler.cpp b/js/src/jit/IonCacheIRCompiler.cpp --- a/js/src/jit/IonCacheIRCompiler.cpp +++ b/js/src/jit/IonCacheIRCompiler.cpp @@ -10,20 +10,19 @@ #include "jit/CacheIRCompiler.h" #include "jit/IonIC.h" #include "jit/JSJitFrameIter.h" #include "jit/Linker.h" #include "jit/SharedICHelpers.h" #include "proxy/DeadObjectProxy.h" #include "proxy/Proxy.h" -#include "jscompartmentinlines.h" - #include "jit/JSJitFrameIter-inl.h" #include "jit/MacroAssembler-inl.h" +#include "vm/JSCompartment-inl.h" #include "vm/TypeInference-inl.h" using namespace js; using namespace js::jit; using mozilla::DebugOnly; namespace js { diff --git a/js/src/jit/JitSpewer.cpp b/js/src/jit/JitSpewer.cpp --- a/js/src/jit/JitSpewer.cpp +++ b/js/src/jit/JitSpewer.cpp @@ -24,17 +24,17 @@ #include "jit/MIRGenerator.h" #include "jit/MIRGraph.h" #include "threading/LockGuard.h" #include "vm/HelperThreads.h" #include "vm/MutexIDs.h" -#include "jscompartmentinlines.h" +#include "vm/JSCompartment-inl.h" #ifndef JIT_SPEW_DIR # if defined(_WIN32) # define JIT_SPEW_DIR "." # elif defined(__ANDROID__) # define JIT_SPEW_DIR "/data/local/tmp" # else # define JIT_SPEW_DIR "/tmp" diff --git a/js/src/jit/Linker.h b/js/src/jit/Linker.h --- a/js/src/jit/Linker.h +++ b/js/src/jit/Linker.h @@ -3,22 +3,22 @@ * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef jit_Linker_h #define jit_Linker_h #include "jscntxt.h" -#include "jscompartment.h" #include "jit/ExecutableAllocator.h" #include "jit/IonCode.h" #include "jit/JitCompartment.h" #include "jit/MacroAssembler.h" +#include "vm/JSCompartment.h" namespace js { namespace jit { class Linker { MacroAssembler& masm; mozilla::Maybe awjc; diff --git a/js/src/jit/MIRGenerator.h b/js/src/jit/MIRGenerator.h --- a/js/src/jit/MIRGenerator.h +++ b/js/src/jit/MIRGenerator.h @@ -10,26 +10,26 @@ // This file declares the data structures used to build a control-flow graph // containing MIR. #include "mozilla/Atomics.h" #include #include "jscntxt.h" -#include "jscompartment.h" #include "jit/CompileInfo.h" #include "jit/JitAllocPolicy.h" #include "jit/JitCompartment.h" #include "jit/MIR.h" #ifdef JS_ION_PERF # include "jit/PerfSpewer.h" #endif #include "jit/RegisterSets.h" +#include "vm/JSCompartment.h" namespace js { namespace jit { class MIRGraph; class OptimizationInfo; class MIRGenerator diff --git a/js/src/jit/MacroAssembler.h b/js/src/jit/MacroAssembler.h --- a/js/src/jit/MacroAssembler.h +++ b/js/src/jit/MacroAssembler.h @@ -6,17 +6,17 @@ #ifndef jit_MacroAssembler_h #define jit_MacroAssembler_h #include "mozilla/EndianUtils.h" #include "mozilla/MacroForEach.h" #include "mozilla/MathAlgorithms.h" -#include "jscompartment.h" +#include "vm/JSCompartment.h" #if defined(JS_CODEGEN_X86) # include "jit/x86/MacroAssembler-x86.h" #elif defined(JS_CODEGEN_X64) # include "jit/x64/MacroAssembler-x64.h" #elif defined(JS_CODEGEN_ARM) # include "jit/arm/MacroAssembler-arm.h" #elif defined(JS_CODEGEN_ARM64) diff --git a/js/src/jit/SharedIC.h b/js/src/jit/SharedIC.h --- a/js/src/jit/SharedIC.h +++ b/js/src/jit/SharedIC.h @@ -3,25 +3,25 @@ * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef jit_SharedIC_h #define jit_SharedIC_h #include "jscntxt.h" -#include "jscompartment.h" #include "jsgc.h" #include "jit/BaselineICList.h" #include "jit/BaselineJIT.h" #include "jit/ICState.h" #include "jit/MacroAssembler.h" #include "jit/SharedICList.h" #include "jit/SharedICRegisters.h" +#include "vm/JSCompartment.h" #include "vm/ReceiverGuard.h" #include "vm/TypedArrayObject.h" namespace js { namespace jit { // // Baseline Inline Caches are polymorphic caches that aggressively diff --git a/js/src/jit/arm/Assembler-arm.cpp b/js/src/jit/arm/Assembler-arm.cpp --- a/js/src/jit/arm/Assembler-arm.cpp +++ b/js/src/jit/arm/Assembler-arm.cpp @@ -4,25 +4,25 @@ * 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/arm/Assembler-arm.h" #include "mozilla/DebugOnly.h" #include "mozilla/MathAlgorithms.h" -#include "jscompartment.h" #include "jsutil.h" #include "gc/Marking.h" #include "jit/arm/disasm/Disasm-arm.h" #include "jit/arm/MacroAssembler-arm.h" #include "jit/ExecutableAllocator.h" #include "jit/JitCompartment.h" #include "jit/MacroAssembler.h" +#include "vm/JSCompartment.h" using namespace js; using namespace js::jit; using mozilla::CountLeadingZeroes32; using LabelDoc = DisassemblerSpew::LabelDoc; using LiteralDoc = DisassemblerSpew::LiteralDoc; diff --git a/js/src/jit/arm/Bailouts-arm.cpp b/js/src/jit/arm/Bailouts-arm.cpp --- a/js/src/jit/arm/Bailouts-arm.cpp +++ b/js/src/jit/arm/Bailouts-arm.cpp @@ -1,20 +1,20 @@ /* -*- 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 "jscompartment.h" #include "jit/arm/Assembler-arm.h" #include "jit/Bailouts.h" #include "jit/JitCompartment.h" +#include "vm/JSCompartment.h" using namespace js; using namespace js::jit; namespace js { namespace jit { class BailoutStack diff --git a/js/src/jit/arm/CodeGenerator-arm.cpp b/js/src/jit/arm/CodeGenerator-arm.cpp --- a/js/src/jit/arm/CodeGenerator-arm.cpp +++ b/js/src/jit/arm/CodeGenerator-arm.cpp @@ -6,25 +6,25 @@ #include "jit/arm/CodeGenerator-arm.h" #include "mozilla/ArrayUtils.h" #include "mozilla/MathAlgorithms.h" #include "mozilla/Maybe.h" #include "jscntxt.h" -#include "jscompartment.h" #include "jsnum.h" #include "jit/CodeGenerator.h" #include "jit/JitCompartment.h" #include "jit/JitFrames.h" #include "jit/MIR.h" #include "jit/MIRGraph.h" #include "js/Conversions.h" +#include "vm/JSCompartment.h" #include "vm/Shape.h" #include "vm/TraceLogging.h" #include "jit/MacroAssembler-inl.h" #include "jit/shared/CodeGenerator-shared-inl.h" #include "vm/JSScript-inl.h" using namespace js; diff --git a/js/src/jit/arm/Trampoline-arm.cpp b/js/src/jit/arm/Trampoline-arm.cpp --- a/js/src/jit/arm/Trampoline-arm.cpp +++ b/js/src/jit/arm/Trampoline-arm.cpp @@ -1,22 +1,21 @@ /* -*- 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 "jscompartment.h" - #include "jit/arm/SharedICHelpers-arm.h" #include "jit/Bailouts.h" #include "jit/JitCompartment.h" #include "jit/JitFrames.h" #include "jit/JitSpewer.h" #include "jit/Linker.h" +#include "vm/JSCompartment.h" #ifdef JS_ION_PERF # include "jit/PerfSpewer.h" #endif #include "jit/VMFunctions.h" #include "jit/MacroAssembler-inl.h" #include "jit/SharedICHelpers-inl.h" diff --git a/js/src/jit/arm64/Assembler-arm64.cpp b/js/src/jit/arm64/Assembler-arm64.cpp --- a/js/src/jit/arm64/Assembler-arm64.cpp +++ b/js/src/jit/arm64/Assembler-arm64.cpp @@ -4,26 +4,25 @@ * 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/arm64/Assembler-arm64.h" #include "mozilla/DebugOnly.h" #include "mozilla/MathAlgorithms.h" -#include "jscompartment.h" #include "jsutil.h" #include "gc/Marking.h" - #include "jit/arm64/Architecture-arm64.h" #include "jit/arm64/MacroAssembler-arm64.h" #include "jit/arm64/vixl/Disasm-vixl.h" #include "jit/ExecutableAllocator.h" #include "jit/JitCompartment.h" +#include "vm/JSCompartment.h" #include "gc/StoreBuffer-inl.h" using namespace js; using namespace js::jit; using mozilla::CountLeadingZeroes32; using mozilla::DebugOnly; diff --git a/js/src/jit/arm64/CodeGenerator-arm64.cpp b/js/src/jit/arm64/CodeGenerator-arm64.cpp --- a/js/src/jit/arm64/CodeGenerator-arm64.cpp +++ b/js/src/jit/arm64/CodeGenerator-arm64.cpp @@ -4,24 +4,24 @@ * 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/arm64/CodeGenerator-arm64.h" #include "mozilla/MathAlgorithms.h" #include "jscntxt.h" -#include "jscompartment.h" #include "jsnum.h" #include "jit/CodeGenerator.h" #include "jit/JitCompartment.h" #include "jit/JitFrames.h" #include "jit/MIR.h" #include "jit/MIRGraph.h" +#include "vm/JSCompartment.h" #include "vm/Shape.h" #include "vm/TraceLogging.h" #include "jit/shared/CodeGenerator-shared-inl.h" #include "vm/JSScript-inl.h" using namespace js; using namespace js::jit; diff --git a/js/src/jit/mips-shared/Assembler-mips-shared.cpp b/js/src/jit/mips-shared/Assembler-mips-shared.cpp --- a/js/src/jit/mips-shared/Assembler-mips-shared.cpp +++ b/js/src/jit/mips-shared/Assembler-mips-shared.cpp @@ -4,22 +4,22 @@ * 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/mips-shared/Assembler-mips-shared.h" #include "mozilla/DebugOnly.h" #include "mozilla/MathAlgorithms.h" -#include "jscompartment.h" #include "jsutil.h" #include "gc/Marking.h" #include "jit/ExecutableAllocator.h" #include "jit/JitCompartment.h" +#include "vm/JSCompartment.h" using mozilla::DebugOnly; using namespace js; using namespace js::jit; // Encode a standard register when it is being used as rd, the rs, and // an extra register(rt). These should never be called with an InvalidReg. diff --git a/js/src/jit/mips-shared/CodeGenerator-mips-shared.cpp b/js/src/jit/mips-shared/CodeGenerator-mips-shared.cpp --- a/js/src/jit/mips-shared/CodeGenerator-mips-shared.cpp +++ b/js/src/jit/mips-shared/CodeGenerator-mips-shared.cpp @@ -5,25 +5,25 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "jit/mips-shared/CodeGenerator-mips-shared.h" #include "mozilla/DebugOnly.h" #include "mozilla/MathAlgorithms.h" #include "jscntxt.h" -#include "jscompartment.h" #include "jsnum.h" #include "jit/CodeGenerator.h" #include "jit/JitCompartment.h" #include "jit/JitFrames.h" #include "jit/MIR.h" #include "jit/MIRGraph.h" #include "js/Conversions.h" +#include "vm/JSCompartment.h" #include "vm/Shape.h" #include "vm/TraceLogging.h" #include "jit/MacroAssembler-inl.h" #include "jit/shared/CodeGenerator-shared-inl.h" #include "vm/JSScript-inl.h" using namespace js; diff --git a/js/src/jit/mips32/Bailouts-mips32.cpp b/js/src/jit/mips32/Bailouts-mips32.cpp --- a/js/src/jit/mips32/Bailouts-mips32.cpp +++ b/js/src/jit/mips32/Bailouts-mips32.cpp @@ -2,17 +2,18 @@ * 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 "jit/mips32/Bailouts-mips32.h" #include "jscntxt.h" -#include "jscompartment.h" + +#include "vm/JSCompartment.h" using namespace js; using namespace js::jit; BailoutFrameInfo::BailoutFrameInfo(const JitActivationIterator& activations, BailoutStack* bailout) : machine_(bailout->machine()) { diff --git a/js/src/jit/mips32/Trampoline-mips32.cpp b/js/src/jit/mips32/Trampoline-mips32.cpp --- a/js/src/jit/mips32/Trampoline-mips32.cpp +++ b/js/src/jit/mips32/Trampoline-mips32.cpp @@ -1,29 +1,28 @@ /* -*- 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 "mozilla/DebugOnly.h" -#include "jscompartment.h" - #include "jit/Bailouts.h" #include "jit/JitCompartment.h" #include "jit/JitFrames.h" #include "jit/JitSpewer.h" #include "jit/Linker.h" #include "jit/mips-shared/SharedICHelpers-mips-shared.h" #include "jit/mips32/Bailouts-mips32.h" #ifdef JS_ION_PERF # include "jit/PerfSpewer.h" #endif #include "jit/VMFunctions.h" +#include "vm/JSCompartment.h" #include "jit/MacroAssembler-inl.h" #include "jit/SharedICHelpers-inl.h" using namespace js; using namespace js::jit; static_assert(sizeof(uintptr_t) == sizeof(uint32_t), "Not 64-bit clean."); diff --git a/js/src/jit/mips64/Bailouts-mips64.cpp b/js/src/jit/mips64/Bailouts-mips64.cpp --- a/js/src/jit/mips64/Bailouts-mips64.cpp +++ b/js/src/jit/mips64/Bailouts-mips64.cpp @@ -2,17 +2,18 @@ * 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 "jit/mips64/Bailouts-mips64.h" #include "jscntxt.h" -#include "jscompartment.h" + +#include "vm/JSCompartment.h" using namespace js; using namespace js::jit; BailoutFrameInfo::BailoutFrameInfo(const JitActivationIterator& activations, BailoutStack* bailout) : machine_(bailout->machineState()) { diff --git a/js/src/jit/mips64/Trampoline-mips64.cpp b/js/src/jit/mips64/Trampoline-mips64.cpp --- a/js/src/jit/mips64/Trampoline-mips64.cpp +++ b/js/src/jit/mips64/Trampoline-mips64.cpp @@ -1,29 +1,28 @@ /* -*- 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 "mozilla/DebugOnly.h" -#include "jscompartment.h" - #include "jit/Bailouts.h" #include "jit/JitCompartment.h" #include "jit/JitFrames.h" #include "jit/JitSpewer.h" #include "jit/Linker.h" #include "jit/mips-shared/SharedICHelpers-mips-shared.h" #include "jit/mips64/Bailouts-mips64.h" #ifdef JS_ION_PERF # include "jit/PerfSpewer.h" #endif #include "jit/VMFunctions.h" +#include "vm/JSCompartment.h" #include "jit/MacroAssembler-inl.h" #include "jit/SharedICHelpers-inl.h" using namespace js; using namespace js::jit; // All registers to save and restore. This includes the stack pointer, since we diff --git a/js/src/jit/none/Trampoline-none.cpp b/js/src/jit/none/Trampoline-none.cpp --- a/js/src/jit/none/Trampoline-none.cpp +++ b/js/src/jit/none/Trampoline-none.cpp @@ -1,18 +1,17 @@ /* -*- 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 "jscompartment.h" - #include "jit/Bailouts.h" #include "jit/BaselineIC.h" +#include "vm/JSCompartment.h" using namespace js; using namespace js::jit; // This file includes stubs for generating the JIT trampolines when there is no // JIT backend, and also includes implementations for assorted random things // which can't be implemented in headers. diff --git a/js/src/jit/x86/Bailouts-x86.cpp b/js/src/jit/x86/Bailouts-x86.cpp --- a/js/src/jit/x86/Bailouts-x86.cpp +++ b/js/src/jit/x86/Bailouts-x86.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 "jscompartment.h" #include "jit/Bailouts.h" #include "jit/JitCompartment.h" +#include "vm/JSCompartment.h" using namespace js; using namespace js::jit; #if defined(_WIN32) # pragma pack(push, 1) #endif diff --git a/js/src/jit/x86/MacroAssembler-x86.h b/js/src/jit/x86/MacroAssembler-x86.h --- a/js/src/jit/x86/MacroAssembler-x86.h +++ b/js/src/jit/x86/MacroAssembler-x86.h @@ -2,21 +2,20 @@ * vim: set ts=8 sts=4 et sw=4 tw=99: * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef jit_x86_MacroAssembler_x86_h #define jit_x86_MacroAssembler_x86_h -#include "jscompartment.h" - #include "jit/JitFrames.h" #include "jit/MoveResolver.h" #include "jit/x86-shared/MacroAssembler-x86-shared.h" +#include "vm/JSCompartment.h" namespace js { namespace jit { class MacroAssemblerX86 : public MacroAssemblerX86Shared { private: // Perform a downcast. Should be removed by Bug 996602. diff --git a/js/src/jit/x86/Trampoline-x86.cpp b/js/src/jit/x86/Trampoline-x86.cpp --- a/js/src/jit/x86/Trampoline-x86.cpp +++ b/js/src/jit/x86/Trampoline-x86.cpp @@ -1,29 +1,28 @@ /* -*- 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 "mozilla/MathAlgorithms.h" -#include "jscompartment.h" - #include "jit/Bailouts.h" #include "jit/BaselineJIT.h" #include "jit/JitCompartment.h" #include "jit/JitFrames.h" #include "jit/JitSpewer.h" #include "jit/Linker.h" #ifdef JS_ION_PERF # include "jit/PerfSpewer.h" #endif #include "jit/VMFunctions.h" #include "jit/x86/SharedICHelpers-x86.h" +#include "vm/JSCompartment.h" #include "vtune/VTuneWrapper.h" #include "jit/MacroAssembler-inl.h" #include "jit/SharedICHelpers-inl.h" #include "vm/JSScript-inl.h" using mozilla::IsPowerOfTwo; diff --git a/js/src/jsapi-tests/testArrayBufferView.cpp b/js/src/jsapi-tests/testArrayBufferView.cpp --- a/js/src/jsapi-tests/testArrayBufferView.cpp +++ b/js/src/jsapi-tests/testArrayBufferView.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: */ -#include "jscompartment.h" #include "jsfriendapi.h" #include "jsapi-tests/tests.h" +#include "vm/JSCompartment.h" #include "vm/ProxyObject.h" -#include "jscompartmentinlines.h" +#include "vm/JSCompartment-inl.h" using namespace js; BEGIN_TEST(testArrayBufferView_type) { CHECK((TestViewType, JS_GetObjectAsUint8Array, diff --git a/js/src/jsapi-tests/testGCMarking.cpp b/js/src/jsapi-tests/testGCMarking.cpp --- a/js/src/jsapi-tests/testGCMarking.cpp +++ b/js/src/jsapi-tests/testGCMarking.cpp @@ -1,21 +1,21 @@ /* -*- 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 "jsapi.h" -#include "jscompartment.h" #include "js/RootingAPI.h" #include "js/SliceBudget.h" #include "jsapi-tests/tests.h" +#include "vm/JSCompartment.h" static bool ConstructCCW(JSContext* cx, const JSClass* globalClasp, JS::HandleObject global1, JS::MutableHandleObject wrapper, JS::MutableHandleObject global2, JS::MutableHandleObject wrappee) { if (!global1) { fprintf(stderr, "null initial global"); diff --git a/js/src/jsapi-tests/testIndexToString.cpp b/js/src/jsapi-tests/testIndexToString.cpp --- a/js/src/jsapi-tests/testIndexToString.cpp +++ b/js/src/jsapi-tests/testIndexToString.cpp @@ -1,21 +1,21 @@ /* -*- 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 "jscompartment.h" #include "jsnum.h" #include "jsstr.h" #include "jsapi-tests/tests.h" +#include "vm/JSCompartment.h" #include "vm/String-inl.h" using mozilla::ArrayLength; static const struct TestPair { uint32_t num; const char* expected; diff --git a/js/src/jsapi-tests/testSavedStacks.cpp b/js/src/jsapi-tests/testSavedStacks.cpp --- a/js/src/jsapi-tests/testSavedStacks.cpp +++ b/js/src/jsapi-tests/testSavedStacks.cpp @@ -1,21 +1,21 @@ /* -*- 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 "jscompartment.h" #include "jsfriendapi.h" #include "jsstr.h" #include "builtin/TestingFunctions.h" #include "jsapi-tests/tests.h" #include "vm/ArrayObject.h" +#include "vm/JSCompartment.h" #include "vm/SavedStacks.h" BEGIN_TEST(testSavedStacks_withNoStack) { JSCompartment* compartment = js::GetContextCompartment(cx); compartment->setAllocationMetadataBuilder(&js::SavedStacks::metadataBuilder); JS::RootedObject obj(cx, js::NewDenseEmptyArray(cx)); compartment->setAllocationMetadataBuilder(nullptr); diff --git a/js/src/jsapi-tests/testTypedArrays.cpp b/js/src/jsapi-tests/testTypedArrays.cpp --- a/js/src/jsapi-tests/testTypedArrays.cpp +++ b/js/src/jsapi-tests/testTypedArrays.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 "jscompartment.h" #include "jsfriendapi.h" #include "jsapi-tests/tests.h" +#include "vm/JSCompartment.h" using namespace js; BEGIN_TEST(testTypedArrays) { bool ok = true; ok = ok && diff --git a/js/src/jsapi-tests/testWeakMap.cpp b/js/src/jsapi-tests/testWeakMap.cpp --- a/js/src/jsapi-tests/testWeakMap.cpp +++ b/js/src/jsapi-tests/testWeakMap.cpp @@ -1,20 +1,18 @@ /* -*- 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 "jscompartment.h" - #include "gc/Zone.h" - #include "jsapi-tests/tests.h" +#include "vm/JSCompartment.h" JSObject* keyDelegate = nullptr; BEGIN_TEST(testWeakMap_basicOperations) { JS::RootedObject map(cx, JS::NewWeakMapObject(cx)); CHECK(IsWeakMapObject(map)); diff --git a/js/src/jsatom.cpp b/js/src/jsatom.cpp --- a/js/src/jsatom.cpp +++ b/js/src/jsatom.cpp @@ -21,19 +21,19 @@ #include "jsstr.h" #include "jstypes.h" #include "gc/Marking.h" #include "vm/Symbol.h" #include "vm/Xdr.h" #include "jscntxtinlines.h" -#include "jscompartmentinlines.h" #include "gc/AtomMarking-inl.h" +#include "vm/JSCompartment-inl.h" #include "vm/JSObject-inl.h" #include "vm/String-inl.h" using namespace js; using namespace js::gc; using mozilla::ArrayEnd; using mozilla::ArrayLength; diff --git a/js/src/jscntxt.cpp b/js/src/jscntxt.cpp --- a/js/src/jscntxt.cpp +++ b/js/src/jscntxt.cpp @@ -23,17 +23,16 @@ # include # include # include #endif // ANDROID #ifdef XP_WIN #include #endif // XP_WIN -#include "jscompartment.h" #include "jsdtoa.h" #include "jsexn.h" #include "jsiter.h" #include "jsnativestack.h" #include "jsopcode.h" #include "jsprf.h" #include "jspubtd.h" #include "jsstr.h" @@ -42,16 +41,17 @@ #include "gc/FreeOp.h" #include "gc/Marking.h" #include "jit/Ion.h" #include "jit/PcScriptCache.h" #include "js/CharacterEncoding.h" #include "vm/ErrorReporting.h" #include "vm/HelperThreads.h" +#include "vm/JSCompartment.h" #include "vm/JSFunction.h" #include "vm/JSObject.h" #include "vm/JSScript.h" #include "vm/Shape.h" #include "wasm/WasmSignalHandlers.h" #include "vm/JSObject-inl.h" #include "vm/JSScript-inl.h" diff --git a/js/src/jscntxtinlines.h b/js/src/jscntxtinlines.h --- a/js/src/jscntxtinlines.h +++ b/js/src/jscntxtinlines.h @@ -3,25 +3,25 @@ * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef jscntxtinlines_h #define jscntxtinlines_h #include "jscntxt.h" -#include "jscompartment.h" #include "jsiter.h" #include "builtin/Object.h" #include "jit/JitFrames.h" #include "proxy/Proxy.h" #include "vm/HelperThreads.h" #include "vm/Interpreter.h" +#include "vm/JSCompartment.h" #include "vm/Symbol.h" namespace js { class CompartmentChecker { JSCompartment* compartment; diff --git a/js/src/jsfriendapi.cpp b/js/src/jsfriendapi.cpp --- a/js/src/jsfriendapi.cpp +++ b/js/src/jsfriendapi.cpp @@ -6,27 +6,27 @@ #include "jsfriendapi.h" #include "mozilla/PodOperations.h" #include #include "jscntxt.h" -#include "jscompartment.h" #include "jsprf.h" #include "jsweakmap.h" #include "jswrapper.h" #include "builtin/Promise.h" #include "builtin/TestingFunctions.h" #include "gc/GCInternals.h" #include "js/Proxy.h" #include "proxy/DeadObjectProxy.h" #include "vm/ArgumentsObject.h" +#include "vm/JSCompartment.h" #include "vm/JSObject.h" #include "vm/Time.h" #include "vm/WrapperObject.h" #include "gc/Nursery-inl.h" #include "vm/EnvironmentObject-inl.h" #include "vm/JSObject-inl.h" #include "vm/JSScript-inl.h" diff --git a/js/src/jsgc.cpp b/js/src/jsgc.cpp --- a/js/src/jsgc.cpp +++ b/js/src/jsgc.cpp @@ -202,17 +202,16 @@ #include #ifndef XP_WIN # include # include #endif #include "jsapi.h" #include "jscntxt.h" -#include "jscompartment.h" #include "jsfriendapi.h" #include "jsprf.h" #include "jstypes.h" #include "jsutil.h" #include "jsweakmap.h" #ifdef XP_WIN # include "jswin.h" #endif @@ -225,16 +224,17 @@ #include "gc/Policy.h" #include "jit/BaselineJIT.h" #include "jit/IonCode.h" #include "jit/JitcodeMap.h" #include "js/SliceBudget.h" #include "proxy/DeadObjectProxy.h" #include "vm/Debugger.h" #include "vm/GeckoProfiler.h" +#include "vm/JSCompartment.h" #include "vm/JSObject.h" #include "vm/JSScript.h" #include "vm/Printer.h" #include "vm/ProxyObject.h" #include "vm/Shape.h" #include "vm/String.h" #include "vm/Symbol.h" #include "vm/Time.h" diff --git a/js/src/jsmath.cpp b/js/src/jsmath.cpp --- a/js/src/jsmath.cpp +++ b/js/src/jsmath.cpp @@ -13,35 +13,32 @@ #include "mozilla/FloatingPoint.h" #include "mozilla/MathAlgorithms.h" #include "mozilla/MemoryReporting.h" #include "mozilla/Unused.h" #include "mozilla/WrappingOperations.h" #include // for std::max #include - #ifdef XP_UNIX # include #endif #include "fdlibm.h" - +#include "jsapi.h" +#include "jscntxt.h" +#include "jslibmath.h" +#include "jstypes.h" #ifdef XP_WIN # include "jswin.h" #endif -#include "jsapi.h" -#include "jscntxt.h" -#include "jscompartment.h" -#include "jslibmath.h" -#include "jstypes.h" - #include "jit/InlinableNatives.h" #include "js/Class.h" +#include "vm/JSCompartment.h" #include "vm/Time.h" #include "vm/JSObject-inl.h" #if defined(XP_WIN) // #define needed to link in RtlGenRandom(), a.k.a. SystemFunction036. See the // "Community Additions" comment on MSDN here: // https://msdn.microsoft.com/en-us/library/windows/desktop/aa387694.aspx diff --git a/js/src/jsopcode.cpp b/js/src/jsopcode.cpp --- a/js/src/jsopcode.cpp +++ b/js/src/jsopcode.cpp @@ -20,41 +20,41 @@ #include #include #include #include #include #include "jsapi.h" #include "jscntxt.h" -#include "jscompartment.h" #include "jsnum.h" #include "jsprf.h" #include "jsstr.h" #include "jstypes.h" #include "jsutil.h" #include "frontend/BytecodeCompiler.h" #include "frontend/SourceNotes.h" #include "gc/FreeOp.h" #include "gc/GCInternals.h" #include "js/CharacterEncoding.h" #include "vm/CodeCoverage.h" #include "vm/EnvironmentObject.h" +#include "vm/JSCompartment.h" #include "vm/JSFunction.h" #include "vm/JSObject.h" #include "vm/JSScript.h" #include "vm/Opcodes.h" #include "vm/Shape.h" #include "vm/StringBuffer.h" #include "jscntxtinlines.h" -#include "jscompartmentinlines.h" #include "gc/Iteration-inl.h" +#include "vm/JSCompartment-inl.h" #include "vm/JSObject-inl.h" #include "vm/JSScript-inl.h" using namespace js; using namespace js::gc; using JS::AutoCheckCannotGC; diff --git a/js/src/jsweakmap.h b/js/src/jsweakmap.h --- a/js/src/jsweakmap.h +++ b/js/src/jsweakmap.h @@ -5,22 +5,22 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #ifndef jsweakmap_h #define jsweakmap_h #include "mozilla/LinkedList.h" #include "mozilla/Move.h" -#include "jscompartment.h" #include "jsfriendapi.h" #include "gc/DeletePolicy.h" #include "gc/StoreBuffer.h" #include "js/HashTable.h" +#include "vm/JSCompartment.h" #include "vm/JSObject.h" namespace js { class GCMarker; class WeakMapBase; // A subclass template of js::HashMap whose keys and values may be garbage-collected. When diff --git a/js/src/moz.build b/js/src/moz.build --- a/js/src/moz.build +++ b/js/src/moz.build @@ -286,17 +286,16 @@ UNIFIED_SOURCES += [ 'jit/TypePolicy.cpp', 'jit/ValueNumbering.cpp', 'jit/VMFunctions.cpp', 'jit/WasmBCE.cpp', 'jsalloc.cpp', 'jsapi.cpp', 'jsbool.cpp', 'jscntxt.cpp', - 'jscompartment.cpp', 'jsdate.cpp', 'jsexn.cpp', 'jsfriendapi.cpp', 'jsgc.cpp', 'jsiter.cpp', 'jsnativestack.cpp', 'jsnum.cpp', 'json.cpp', @@ -332,16 +331,17 @@ UNIFIED_SOURCES += [ 'vm/ErrorReporting.cpp', 'vm/ForOfIterator.cpp', 'vm/GeckoProfiler.cpp', 'vm/GeneratorObject.cpp', 'vm/GlobalObject.cpp', 'vm/HelperThreads.cpp', 'vm/Id.cpp', 'vm/Initialization.cpp', + 'vm/JSCompartment.cpp', 'vm/JSFunction.cpp', 'vm/JSObject.cpp', 'vm/JSONParser.cpp', 'vm/JSONPrinter.cpp', 'vm/JSScript.cpp', 'vm/MemoryMetrics.cpp', 'vm/NativeObject.cpp', 'vm/ObjectGroup.cpp', diff --git a/js/src/proxy/CrossCompartmentWrapper.cpp b/js/src/proxy/CrossCompartmentWrapper.cpp --- a/js/src/proxy/CrossCompartmentWrapper.cpp +++ b/js/src/proxy/CrossCompartmentWrapper.cpp @@ -5,19 +5,18 @@ * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "jsiter.h" #include "jswrapper.h" #include "proxy/DeadObjectProxy.h" #include "vm/WrapperObject.h" -#include "jscompartmentinlines.h" - #include "gc/Nursery-inl.h" +#include "vm/JSCompartment-inl.h" #include "vm/JSObject-inl.h" using namespace js; #define PIERCE(cx, wrapper, pre, op, post) \ JS_BEGIN_MACRO \ bool ok; \ { \ diff --git a/js/src/proxy/Wrapper.cpp b/js/src/proxy/Wrapper.cpp --- a/js/src/proxy/Wrapper.cpp +++ b/js/src/proxy/Wrapper.cpp @@ -1,21 +1,21 @@ /* -*- 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 "jscompartment.h" #include "jsexn.h" #include "jswrapper.h" #include "js/Proxy.h" #include "vm/ErrorObject.h" +#include "vm/JSCompartment.h" #include "vm/ProxyObject.h" #include "vm/RegExpObject.h" #include "vm/WrapperObject.h" #include "gc/Marking-inl.h" #include "vm/JSObject-inl.h" #include "vm/NativeObject-inl.h" diff --git a/js/src/shell/js.cpp b/js/src/shell/js.cpp --- a/js/src/shell/js.cpp +++ b/js/src/shell/js.cpp @@ -106,20 +106,19 @@ #include "vm/Shape.h" #include "vm/SharedArrayObject.h" #include "vm/StringBuffer.h" #include "vm/Time.h" #include "vm/TypedArrayObject.h" #include "vm/WrapperObject.h" #include "wasm/WasmJS.h" -#include "jscompartmentinlines.h" - #include "vm/ErrorObject-inl.h" #include "vm/Interpreter-inl.h" +#include "vm/JSCompartment-inl.h" #include "vm/JSObject-inl.h" #include "vm/Stack-inl.h" using namespace js; using namespace js::cli; using namespace js::shell; using js::shell::RCFile; diff --git a/js/src/vm/AsyncFunction.cpp b/js/src/vm/AsyncFunction.cpp --- a/js/src/vm/AsyncFunction.cpp +++ b/js/src/vm/AsyncFunction.cpp @@ -3,22 +3,21 @@ * 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 "vm/AsyncFunction.h" #include "mozilla/Maybe.h" -#include "jscompartment.h" - #include "builtin/Promise.h" #include "vm/GeneratorObject.h" #include "vm/GlobalObject.h" #include "vm/Interpreter.h" +#include "vm/JSCompartment.h" #include "vm/SelfHosting.h" using namespace js; using namespace js::gc; using mozilla::Maybe; /* static */ bool diff --git a/js/src/vm/AsyncIteration.cpp b/js/src/vm/AsyncIteration.cpp --- a/js/src/vm/AsyncIteration.cpp +++ b/js/src/vm/AsyncIteration.cpp @@ -2,22 +2,22 @@ * 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 "vm/AsyncIteration.h" #include "jsarray.h" -#include "jscompartment.h" #include "builtin/Promise.h" #include "vm/GeneratorObject.h" #include "vm/GlobalObject.h" #include "vm/Interpreter.h" +#include "vm/JSCompartment.h" #include "vm/SelfHosting.h" #include "jscntxtinlines.h" #include "vm/JSObject-inl.h" #include "vm/List-inl.h" #include "vm/NativeObject-inl.h" diff --git a/js/src/vm/Caches-inl.h b/js/src/vm/Caches-inl.h --- a/js/src/vm/Caches-inl.h +++ b/js/src/vm/Caches-inl.h @@ -4,20 +4,19 @@ * 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_Caches_inl_h #define vm_Caches_inl_h #include "vm/Caches.h" -#include "jscompartment.h" - #include "gc/Allocator.h" #include "gc/GCTrace.h" +#include "vm/JSCompartment.h" #include "vm/Probes.h" #include "vm/JSObject-inl.h" namespace js { inline bool NewObjectCache::lookupProto(const Class* clasp, JSObject* proto, gc::AllocKind kind, EntryIndex* pentry) diff --git a/js/src/vm/CodeCoverage.cpp b/js/src/vm/CodeCoverage.cpp --- a/js/src/vm/CodeCoverage.cpp +++ b/js/src/vm/CodeCoverage.cpp @@ -13,20 +13,20 @@ #include #ifdef XP_WIN #include #define getpid _getpid #else #include #endif -#include "jscompartment.h" #include "jsopcode.h" #include "jsprf.h" +#include "vm/JSCompartment.h" #include "vm/JSScript.h" #include "vm/Runtime.h" #include "vm/Time.h" // This file contains a few functions which are used to produce files understood // by lcov tools. A detailed description of the format is available in the man // page for "geninfo" [1]. To make it short, the following paraphrases what is // commented in the man page by using curly braces prefixed by for-each to diff --git a/js/src/vm/Debugger.cpp b/js/src/vm/Debugger.cpp --- a/js/src/vm/Debugger.cpp +++ b/js/src/vm/Debugger.cpp @@ -7,17 +7,16 @@ #include "vm/Debugger-inl.h" #include "mozilla/DebugOnly.h" #include "mozilla/ScopeExit.h" #include "mozilla/Sprintf.h" #include "mozilla/TypeTraits.h" #include "jscntxt.h" -#include "jscompartment.h" #include "jsfriendapi.h" #include "jshashutil.h" #include "jsnum.h" #include "jsprf.h" #include "jswrapper.h" #include "frontend/BytecodeCompiler.h" #include "frontend/Parser.h" @@ -31,16 +30,17 @@ #include "js/Vector.h" #include "proxy/ScriptedProxyHandler.h" #include "vm/ArgumentsObject.h" #include "vm/AsyncFunction.h" #include "vm/AsyncIteration.h" #include "vm/DebuggerMemory.h" #include "vm/GeckoProfiler.h" #include "vm/GeneratorObject.h" +#include "vm/JSCompartment.h" #include "vm/JSObject.h" #include "vm/TraceLogging.h" #include "vm/WrapperObject.h" #include "wasm/WasmInstance.h" #include "jsgcinlines.h" #include "jsopcodeinlines.h" diff --git a/js/src/vm/Debugger.h b/js/src/vm/Debugger.h --- a/js/src/vm/Debugger.h +++ b/js/src/vm/Debugger.h @@ -10,27 +10,27 @@ #include "mozilla/DoublyLinkedList.h" #include "mozilla/GuardObjects.h" #include "mozilla/LinkedList.h" #include "mozilla/Range.h" #include "mozilla/TimeStamp.h" #include "mozilla/Vector.h" #include "jscntxt.h" -#include "jscompartment.h" #include "jsweakmap.h" #include "jswrapper.h" #include "builtin/Promise.h" #include "ds/TraceableFifo.h" #include "gc/Barrier.h" #include "js/Debug.h" #include "js/GCVariant.h" #include "js/HashTable.h" #include "vm/GlobalObject.h" +#include "vm/JSCompartment.h" #include "vm/SavedStacks.h" #include "wasm/WasmJS.h" enum JSTrapStatus { JSTRAP_ERROR, JSTRAP_CONTINUE, JSTRAP_RETURN, JSTRAP_THROW, diff --git a/js/src/vm/DebuggerMemory.cpp b/js/src/vm/DebuggerMemory.cpp --- a/js/src/vm/DebuggerMemory.cpp +++ b/js/src/vm/DebuggerMemory.cpp @@ -9,27 +9,27 @@ #include "mozilla/Maybe.h" #include "mozilla/Move.h" #include "mozilla/Vector.h" #include #include "jsalloc.h" #include "jscntxt.h" -#include "jscompartment.h" #include "builtin/MapObject.h" #include "gc/Marking.h" #include "js/Debug.h" #include "js/TracingAPI.h" #include "js/UbiNode.h" #include "js/UbiNodeCensus.h" #include "js/Utility.h" #include "vm/Debugger.h" #include "vm/GlobalObject.h" +#include "vm/JSCompartment.h" #include "vm/SavedStacks.h" #include "vm/Debugger-inl.h" #include "vm/NativeObject-inl.h" using namespace js; using JS::ubi::BreadthFirst; diff --git a/js/src/vm/EnvironmentObject.cpp b/js/src/vm/EnvironmentObject.cpp --- a/js/src/vm/EnvironmentObject.cpp +++ b/js/src/vm/EnvironmentObject.cpp @@ -4,24 +4,24 @@ * 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 "vm/EnvironmentObject-inl.h" #include "mozilla/PodOperations.h" #include "mozilla/ScopeExit.h" -#include "jscompartment.h" #include "jsiter.h" #include "builtin/ModuleObject.h" #include "gc/Policy.h" #include "vm/ArgumentsObject.h" #include "vm/AsyncFunction.h" #include "vm/GlobalObject.h" +#include "vm/JSCompartment.h" #include "vm/ProxyObject.h" #include "vm/Shape.h" #include "vm/Xdr.h" #include "wasm/WasmInstance.h" #include "gc/Marking-inl.h" #include "vm/JSScript-inl.h" #include "vm/NativeObject-inl.h" diff --git a/js/src/vm/ForOfIterator.cpp b/js/src/vm/ForOfIterator.cpp --- a/js/src/vm/ForOfIterator.cpp +++ b/js/src/vm/ForOfIterator.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 "jsapi.h" #include "jscntxt.h" -#include "jscompartment.h" #include "vm/Interpreter.h" +#include "vm/JSCompartment.h" #include "vm/JSObject.h" #include "vm/PIC.h" #include "vm/JSObject-inl.h" using namespace js; using JS::ForOfIterator; diff --git a/js/src/vm/GlobalObject.cpp b/js/src/vm/GlobalObject.cpp --- a/js/src/vm/GlobalObject.cpp +++ b/js/src/vm/GlobalObject.cpp @@ -32,18 +32,17 @@ #include "vm/Debugger.h" #include "vm/EnvironmentObject.h" #include "vm/HelperThreads.h" #include "vm/PIC.h" #include "vm/RegExpStatics.h" #include "vm/RegExpStaticsObject.h" #include "wasm/WasmJS.h" -#include "jscompartmentinlines.h" - +#include "vm/JSCompartment-inl.h" #include "vm/JSObject-inl.h" #include "vm/JSScript-inl.h" #include "vm/NativeObject-inl.h" using namespace js; struct ProtoTableEntry { const Class* clasp; diff --git a/js/src/vm/HelperThreads.cpp b/js/src/vm/HelperThreads.cpp --- a/js/src/vm/HelperThreads.cpp +++ b/js/src/vm/HelperThreads.cpp @@ -21,19 +21,19 @@ #include "vm/Debugger.h" #include "vm/ErrorReporting.h" #include "vm/SharedImmutableStringsCache.h" #include "vm/Time.h" #include "vm/TraceLogging.h" #include "vm/Xdr.h" #include "jscntxtinlines.h" -#include "jscompartmentinlines.h" #include "gc/Iteration-inl.h" +#include "vm/JSCompartment-inl.h" #include "vm/JSObject-inl.h" #include "vm/JSScript-inl.h" #include "vm/NativeObject-inl.h" using namespace js; using mozilla::ArrayLength; using mozilla::DebugOnly; diff --git a/js/src/vm/Interpreter-inl.h b/js/src/vm/Interpreter-inl.h --- a/js/src/vm/Interpreter-inl.h +++ b/js/src/vm/Interpreter-inl.h @@ -4,22 +4,22 @@ * 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_Interpreter_inl_h #define vm_Interpreter_inl_h #include "vm/Interpreter.h" -#include "jscompartment.h" #include "jsnum.h" #include "jsstr.h" #include "jit/Ion.h" #include "vm/ArgumentsObject.h" +#include "vm/JSCompartment.h" #include "vm/EnvironmentObject-inl.h" #include "vm/JSObject-inl.h" #include "vm/Stack-inl.h" #include "vm/String-inl.h" #include "vm/UnboxedObject-inl.h" namespace js { diff --git a/js/src/jscompartmentinlines.h b/js/src/vm/JSCompartment-inl.h rename from js/src/jscompartmentinlines.h rename to js/src/vm/JSCompartment-inl.h --- a/js/src/jscompartmentinlines.h +++ b/js/src/vm/JSCompartment-inl.h @@ -1,18 +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/. */ -#ifndef jscompartmentinlines_h -#define jscompartmentinlines_h +#ifndef vm_JSCompartment_inl_h +#define vm_JSCompartment_inl_h -#include "jscompartment.h" +#include "vm/JSCompartment.h" + #include "jsiter.h" #include "gc/Barrier.h" #include "gc/Marking.h" #include "jscntxtinlines.h" inline void @@ -171,9 +172,9 @@ JSCompartment::objectMaybeInIteration(JS // If the list contains a single object, check if it's |obj|. if (next->next() == enumerators) return next->obj == obj; return true; } -#endif /* jscompartmentinlines_h */ +#endif /* vm_JSCompartment_inl_h */ diff --git a/js/src/jscompartment.cpp b/js/src/vm/JSCompartment.cpp rename from js/src/jscompartment.cpp rename to js/src/vm/JSCompartment.cpp --- a/js/src/jscompartment.cpp +++ b/js/src/vm/JSCompartment.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 "jscompartmentinlines.h" +#include "vm/JSCompartment-inl.h" #include "mozilla/DebugOnly.h" #include "mozilla/MemoryReporting.h" #include #include "jscntxt.h" #include "jsfriendapi.h" diff --git a/js/src/jscompartment.h b/js/src/vm/JSCompartment.h rename from js/src/jscompartment.h rename to js/src/vm/JSCompartment.h --- a/js/src/jscompartment.h +++ b/js/src/vm/JSCompartment.h @@ -1,16 +1,16 @@ /* -*- Mode: C++; tab-width: 8; indent-tabs-mode: nil; c-basic-offset: 4 -*- * vim: set ts=8 sts=4 et sw=4 tw=99: * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ -#ifndef jscompartment_h -#define jscompartment_h +#ifndef vm_JSCompartment_h +#define vm_JSCompartment_h #include "mozilla/LinkedList.h" #include "mozilla/Maybe.h" #include "mozilla/MemoryReporting.h" #include "mozilla/Tuple.h" #include "mozilla/Variant.h" #include "mozilla/XorShift128PlusRNG.h" @@ -1459,9 +1459,9 @@ class MOZ_RAII AutoSuppressAllocationMet namespace JS { template <> struct GCPolicy : public StructGCPolicy { static bool isTenured(const js::CrossCompartmentKey& key) { return key.isTenured(); } }; } // namespace JS -#endif /* jscompartment_h */ +#endif /* vm_JSCompartment_h */ diff --git a/js/src/vm/JSONParser.cpp b/js/src/vm/JSONParser.cpp --- a/js/src/vm/JSONParser.cpp +++ b/js/src/vm/JSONParser.cpp @@ -8,20 +8,20 @@ #include "mozilla/Range.h" #include "mozilla/RangedPtr.h" #include "mozilla/Sprintf.h" #include #include "jsarray.h" -#include "jscompartment.h" #include "jsnum.h" #include "jsprf.h" +#include "vm/JSCompartment.h" #include "vm/StringBuffer.h" #include "vm/NativeObject-inl.h" using namespace js; using mozilla::RangedPtr; diff --git a/js/src/vm/JSObject-inl.h b/js/src/vm/JSObject-inl.h --- a/js/src/vm/JSObject-inl.h +++ b/js/src/vm/JSObject-inl.h @@ -22,20 +22,20 @@ #include "vm/EnvironmentObject.h" #include "vm/JSFunction.h" #include "vm/NumberObject.h" #include "vm/Probes.h" #include "vm/StringObject.h" #include "vm/TypedArrayObject.h" #include "jsatominlines.h" -#include "jscompartmentinlines.h" #include "gc/Marking-inl.h" #include "gc/ObjectKind-inl.h" +#include "vm/JSCompartment-inl.h" #include "vm/ShapedObject-inl.h" #include "vm/TypeInference-inl.h" namespace js { // This is needed here for ensureShape() below. inline bool MaybeConvertUnboxedObjectToNative(JSContext* cx, JSObject* obj) diff --git a/js/src/vm/JSObject.cpp b/js/src/vm/JSObject.cpp --- a/js/src/vm/JSObject.cpp +++ b/js/src/vm/JSObject.cpp @@ -48,24 +48,24 @@ #include "vm/JSScript.h" #include "vm/ProxyObject.h" #include "vm/RegExpStaticsObject.h" #include "vm/Shape.h" #include "vm/TypedArrayObject.h" #include "jsboolinlines.h" #include "jscntxtinlines.h" -#include "jscompartmentinlines.h" #include "builtin/TypedObject-inl.h" #include "gc/Marking-inl.h" #include "vm/ArrayObject-inl.h" #include "vm/BooleanObject-inl.h" #include "vm/Caches-inl.h" #include "vm/Interpreter-inl.h" +#include "vm/JSCompartment-inl.h" #include "vm/NativeObject-inl.h" #include "vm/NumberObject-inl.h" #include "vm/Shape-inl.h" #include "vm/StringObject-inl.h" #include "vm/TypedArrayObject-inl.h" #include "vm/UnboxedObject-inl.h" using namespace js; diff --git a/js/src/vm/JSScript-inl.h b/js/src/vm/JSScript-inl.h --- a/js/src/vm/JSScript-inl.h +++ b/js/src/vm/JSScript-inl.h @@ -10,18 +10,17 @@ #include "vm/JSScript.h" #include "jit/BaselineJIT.h" #include "jit/IonAnalysis.h" #include "vm/EnvironmentObject.h" #include "vm/RegExpObject.h" #include "wasm/AsmJS.h" -#include "jscompartmentinlines.h" - +#include "vm/JSCompartment-inl.h" #include "vm/Shape-inl.h" namespace js { ScriptCounts::ScriptCounts() : pcCounts_(), throwCounts_(), ionCounts_(nullptr) diff --git a/js/src/vm/MemoryMetrics.cpp b/js/src/vm/MemoryMetrics.cpp --- a/js/src/vm/MemoryMetrics.cpp +++ b/js/src/vm/MemoryMetrics.cpp @@ -3,23 +3,23 @@ * 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 "js/MemoryMetrics.h" #include "mozilla/DebugOnly.h" -#include "jscompartment.h" #include "jsgc.h" #include "gc/Heap.h" #include "jit/BaselineJIT.h" #include "jit/Ion.h" #include "vm/ArrayObject.h" +#include "vm/JSCompartment.h" #include "vm/JSObject.h" #include "vm/JSScript.h" #include "vm/Runtime.h" #include "vm/Shape.h" #include "vm/String.h" #include "vm/Symbol.h" #include "vm/WrapperObject.h" #include "wasm/WasmInstance.h" diff --git a/js/src/vm/PIC.cpp b/js/src/vm/PIC.cpp --- a/js/src/vm/PIC.cpp +++ b/js/src/vm/PIC.cpp @@ -2,21 +2,21 @@ * 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 "vm/PIC.h" #include "jscntxt.h" -#include "jscompartment.h" #include "gc/FreeOp.h" #include "gc/Marking.h" #include "vm/GlobalObject.h" +#include "vm/JSCompartment.h" #include "vm/JSObject.h" #include "vm/SelfHosting.h" #include "vm/JSObject-inl.h" #include "vm/NativeObject-inl.h" using namespace js; using namespace js::gc; diff --git a/js/src/vm/ProxyObject.cpp b/js/src/vm/ProxyObject.cpp --- a/js/src/vm/ProxyObject.cpp +++ b/js/src/vm/ProxyObject.cpp @@ -1,21 +1,20 @@ /* -*- 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 "vm/ProxyObject.h" -#include "jscompartment.h" - #include "gc/Allocator.h" #include "gc/GCTrace.h" #include "proxy/DeadObjectProxy.h" +#include "vm/JSCompartment.h" #include "gc/ObjectKind-inl.h" #include "vm/JSObject-inl.h" #include "vm/TypeInference-inl.h" using namespace js; static gc::AllocKind diff --git a/js/src/vm/Realm.cpp b/js/src/vm/Realm.cpp --- a/js/src/vm/Realm.cpp +++ b/js/src/vm/Realm.cpp @@ -2,21 +2,21 @@ * 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 "js/Realm.h" #include "jscntxt.h" -#include "jscompartment.h" #include "vm/GlobalObject.h" +#include "vm/JSCompartment.h" -#include "jscompartmentinlines.h" +#include "vm/JSCompartment-inl.h" using namespace js; JS_PUBLIC_API(void) gc::TraceRealm(JSTracer* trc, JS::Realm* realm, const char* name) { // The way GC works with compartments is basically incomprehensible. // For Realms, what we want is very simple: each Realm has a strong diff --git a/js/src/vm/SavedStacks.cpp b/js/src/vm/SavedStacks.cpp --- a/js/src/vm/SavedStacks.cpp +++ b/js/src/vm/SavedStacks.cpp @@ -10,30 +10,30 @@ #include "mozilla/Attributes.h" #include "mozilla/DebugOnly.h" #include "mozilla/Move.h" #include #include #include "jsapi.h" -#include "jscompartment.h" #include "jsfriendapi.h" #include "jshashutil.h" #include "jsmath.h" #include "jsnum.h" #include "gc/FreeOp.h" #include "gc/Marking.h" #include "gc/Policy.h" #include "gc/Rooting.h" #include "js/CharacterEncoding.h" #include "js/Vector.h" #include "vm/Debugger.h" #include "vm/GeckoProfiler.h" +#include "vm/JSCompartment.h" #include "vm/JSScript.h" #include "vm/SavedFrame.h" #include "vm/StringBuffer.h" #include "vm/Time.h" #include "vm/WrapperObject.h" #include "jscntxtinlines.h" diff --git a/js/src/vm/SelfHosting.cpp b/js/src/vm/SelfHosting.cpp --- a/js/src/vm/SelfHosting.cpp +++ b/js/src/vm/SelfHosting.cpp @@ -8,17 +8,16 @@ #include "mozilla/ArrayUtils.h" #include "mozilla/Casting.h" #include "mozilla/DebugOnly.h" #include "mozilla/Maybe.h" #include "jsarray.h" #include "jscntxt.h" -#include "jscompartment.h" #include "jsdate.h" #include "jsfriendapi.h" #include "jshashutil.h" #include "jsiter.h" #include "jsstr.h" #include "jswrapper.h" #include "selfhosted.out.h" @@ -43,16 +42,17 @@ #include "gc/Policy.h" #include "jit/AtomicOperations.h" #include "jit/InlinableNatives.h" #include "js/CharacterEncoding.h" #include "js/Date.h" #include "vm/Compression.h" #include "vm/GeneratorObject.h" #include "vm/Interpreter.h" +#include "vm/JSCompartment.h" #include "vm/JSFunction.h" #include "vm/Printer.h" #include "vm/RegExpObject.h" #include "vm/String.h" #include "vm/StringBuffer.h" #include "vm/TypedArrayObject.h" #include "vm/WrapperObject.h" diff --git a/js/src/vm/Shape.cpp b/js/src/vm/Shape.cpp --- a/js/src/vm/Shape.cpp +++ b/js/src/vm/Shape.cpp @@ -16,19 +16,19 @@ #include "jshashutil.h" #include "gc/FreeOp.h" #include "gc/Policy.h" #include "js/HashTable.h" #include "vm/JSObject.h" #include "jscntxtinlines.h" -#include "jscompartmentinlines.h" #include "vm/Caches-inl.h" +#include "vm/JSCompartment-inl.h" #include "vm/JSObject-inl.h" #include "vm/NativeObject-inl.h" using namespace js; using namespace js::gc; using mozilla::CeilingLog2Size; using mozilla::DebugOnly; diff --git a/js/src/vm/Stopwatch.cpp b/js/src/vm/Stopwatch.cpp --- a/js/src/vm/Stopwatch.cpp +++ b/js/src/vm/Stopwatch.cpp @@ -9,19 +9,19 @@ #include "mozilla/ArrayUtils.h" #include "mozilla/IntegerTypeTraits.h" #include "mozilla/Unused.h" #if defined(XP_WIN) #include #endif // defined(XP_WIN) -#include "jscompartment.h" #include "jswin.h" +#include "vm/JSCompartment.h" #include "vm/Runtime.h" namespace js { bool PerformanceMonitoring::addRecentGroup(PerformanceGroup* group) { if (group->isUsedInThisIteration()) diff --git a/js/src/vm/String-inl.h b/js/src/vm/String-inl.h --- a/js/src/vm/String-inl.h +++ b/js/src/vm/String-inl.h @@ -8,21 +8,21 @@ #define vm_String_inl_h #include "vm/String.h" #include "mozilla/PodOperations.h" #include "mozilla/Range.h" #include "jscntxt.h" -#include "jscompartment.h" #include "gc/Allocator.h" #include "gc/FreeOp.h" #include "gc/Marking.h" +#include "vm/JSCompartment.h" namespace js { // Allocate a thin inline string if possible, and a fat inline string if not. template static MOZ_ALWAYS_INLINE JSInlineString* AllocateInlineString(JSContext* cx, size_t len, CharT** chars) { diff --git a/js/src/vm/String.cpp b/js/src/vm/String.cpp --- a/js/src/vm/String.cpp +++ b/js/src/vm/String.cpp @@ -13,19 +13,19 @@ #include "mozilla/TypeTraits.h" #include "mozilla/Unused.h" #include "gc/Marking.h" #include "js/UbiNode.h" #include "vm/GeckoProfiler.h" #include "jscntxtinlines.h" -#include "jscompartmentinlines.h" #include "vm/GeckoProfiler-inl.h" +#include "vm/JSCompartment-inl.h" using namespace js; using mozilla::IsSame; using mozilla::PodCopy; using mozilla::PodEqual; using mozilla::RangedPtr; using mozilla::RoundUpPow2; diff --git a/js/src/vm/Symbol.cpp b/js/src/vm/Symbol.cpp --- a/js/src/vm/Symbol.cpp +++ b/js/src/vm/Symbol.cpp @@ -2,24 +2,24 @@ * vim: set ts=8 sts=4 et sw=4 tw=99: * This Source Code Form is subject to the terms of the Mozilla Public * License, v. 2.0. If a copy of the MPL was not distributed with this * file, You can obtain one at http://mozilla.org/MPL/2.0/. */ #include "vm/Symbol.h" #include "jscntxt.h" -#include "jscompartment.h" #include "builtin/SymbolObject.h" #include "gc/Allocator.h" #include "gc/Rooting.h" +#include "vm/JSCompartment.h" #include "vm/StringBuffer.h" -#include "jscompartmentinlines.h" +#include "vm/JSCompartment-inl.h" using JS::Symbol; using namespace js; Symbol* Symbol::newInternal(JSContext* cx, JS::SymbolCode code, uint32_t hash, JSAtom* description, AutoLockForExclusiveAccess& lock) { diff --git a/js/src/vm/UbiNodeCensus.cpp b/js/src/vm/UbiNodeCensus.cpp --- a/js/src/vm/UbiNodeCensus.cpp +++ b/js/src/vm/UbiNodeCensus.cpp @@ -2,17 +2,18 @@ * 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 "js/UbiNodeCensus.h" #include "jscntxt.h" -#include "jscompartment.h" + +#include "vm/JSCompartment.h" #include "vm/JSObject-inl.h" #include "vm/NativeObject-inl.h" using namespace js; namespace JS { namespace ubi { diff --git a/js/src/vtune/VTuneWrapper.cpp b/js/src/vtune/VTuneWrapper.cpp --- a/js/src/vtune/VTuneWrapper.cpp +++ b/js/src/vtune/VTuneWrapper.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 "vtune/VTuneWrapper.h" #include "mozilla/Sprintf.h" #include "jscntxt.h" -#include "jscompartment.h" #include "threading/LockGuard.h" #include "threading/Mutex.h" +#include "vm/JSCompartment.h" #include "vm/MutexIDs.h" #include "vm/Shape.h" #ifdef MOZ_VTUNE namespace js { namespace vtune { diff --git a/js/src/wasm/WasmBinaryToAST.cpp b/js/src/wasm/WasmBinaryToAST.cpp --- a/js/src/wasm/WasmBinaryToAST.cpp +++ b/js/src/wasm/WasmBinaryToAST.cpp @@ -18,18 +18,18 @@ #include "wasm/WasmBinaryToAST.h" #include "mozilla/CheckedInt.h" #include "mozilla/MathAlgorithms.h" #include "mozilla/Sprintf.h" #include "jscntxt.h" -#include "jscompartment.h" +#include "vm/JSCompartment.h" #include "wasm/WasmBinaryIterator.h" #include "wasm/WasmValidate.h" using namespace js; using namespace js::wasm; using mozilla::CheckedInt; using mozilla::FloorLog2; diff --git a/js/src/wasm/WasmCompartment.cpp b/js/src/wasm/WasmCompartment.cpp --- a/js/src/wasm/WasmCompartment.cpp +++ b/js/src/wasm/WasmCompartment.cpp @@ -13,18 +13,17 @@ * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ #include "wasm/WasmCompartment.h" -#include "jscompartment.h" - +#include "vm/JSCompartment.h" #include "wasm/WasmInstance.h" #include "vm/Debugger-inl.h" using namespace js; using namespace wasm; Compartment::Compartment(Zone* zone) diff --git a/js/src/wasm/WasmTable.cpp b/js/src/wasm/WasmTable.cpp --- a/js/src/wasm/WasmTable.cpp +++ b/js/src/wasm/WasmTable.cpp @@ -16,18 +16,18 @@ * limitations under the License. */ #include "wasm/WasmTable.h" #include "mozilla/CheckedInt.h" #include "jscntxt.h" -#include "jscompartment.h" +#include "vm/JSCompartment.h" #include "wasm/WasmInstance.h" #include "wasm/WasmJS.h" using namespace js; using namespace js::wasm; using mozilla::CheckedInt; Table::Table(JSContext* cx, const TableDesc& desc, HandleWasmTableObject maybeObject, diff --git a/js/src/wasm/WasmValidate.cpp b/js/src/wasm/WasmValidate.cpp --- a/js/src/wasm/WasmValidate.cpp +++ b/js/src/wasm/WasmValidate.cpp @@ -16,20 +16,20 @@ * limitations under the License. */ #include "wasm/WasmValidate.h" #include "mozilla/CheckedInt.h" #include "jscntxt.h" -#include "jscompartment.h" #include "jsprf.h" #include "jit/JitOptions.h" +#include "vm/JSCompartment.h" #include "wasm/WasmBinaryIterator.h" using namespace js; using namespace js::jit; using namespace js::wasm; using mozilla::CheckedInt;