Bug 1486782 - Remove unnecessary includes of gc/Zone.h r=sfink

This commit is contained in:
Jon Coppeard 2018-08-30 20:10:21 +01:00
Родитель 0d4da8dae6
Коммит 3921ce61cc
23 изменённых файлов: 59 добавлений и 55 удалений

Просмотреть файл

@ -38,7 +38,6 @@
#include "ctypes/Library.h"
#include "gc/FreeOp.h"
#include "gc/Policy.h"
#include "gc/Zone.h"
#include "jit/AtomicOperations.h"
#include "js/AutoByteString.h"
#include "js/StableStringChars.h"

Просмотреть файл

@ -12,8 +12,8 @@
#include "frontend/BinSourceRuntimeSupport.h"
#include "frontend/TokenStream.h"
#include "gc/Zone.h"
#include "js/Result.h"
#include "vm/Runtime.h"
namespace js {
namespace frontend {

Просмотреть файл

@ -7,7 +7,6 @@
#include "frontend/BinTokenReaderBase.h"
#include "frontend/BinSource-macros.h"
#include "gc/Zone.h"
#include "js/Result.h"
namespace js {

Просмотреть файл

@ -16,7 +16,6 @@
#include "frontend/BinSource-macros.h"
#include "frontend/BinSourceRuntimeSupport.h"
#include "gc/Zone.h"
#include "js/Result.h"
namespace js {

Просмотреть файл

@ -13,7 +13,6 @@
#include "mozilla/PodOperations.h"
#include "frontend/BinSource-macros.h"
#include "gc/Zone.h"
#include "js/Result.h"
namespace js {

Просмотреть файл

@ -210,7 +210,9 @@
#include "util/Text.h"
#include "util/Unicode.h"
#include "vm/ErrorReporting.h"
#include "vm/RegExpShared.h"
#include "vm/JSAtom.h"
#include "vm/RegExpConstants.h"
#include "vm/StringType.h"
struct JSContext;
struct KeywordInfo;

Просмотреть файл

@ -16,7 +16,6 @@
#include "gc/GC.h"
#include "gc/RelocationOverlay.h"
#include "gc/Zone.h"
#include "vm/HelperThreads.h"
#include "vm/Runtime.h"
@ -321,7 +320,7 @@ IsOOMReason(JS::gcreason::Reason reason)
}
TenuredCell*
AllocateCellInGC(Zone* zone, AllocKind thingKind);
AllocateCellInGC(JS::Zone* zone, AllocKind thingKind);
} /* namespace gc */
} /* namespace js */

Просмотреть файл

@ -9,7 +9,6 @@
#include "gc/WeakMap.h"
#include "gc/Zone.h"
#include "vm/JSContext.h"
namespace js {

Просмотреть файл

@ -27,7 +27,6 @@
#include "frontend/FullParseHandler.h"
#include "frontend/ParseContext.h"
#include "frontend/Parser.h"
#include "gc/Zone.h"
#include "js/Vector.h"
#include "jsapi-tests/tests.h"

Просмотреть файл

@ -18,7 +18,6 @@
#include "mozilla/Maybe.h"
#include "frontend/BinTokenReaderTester.h"
#include "gc/Zone.h"
#include "js/Vector.h"

Просмотреть файл

@ -6,7 +6,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "gc/GCInternals.h"
#include "gc/Zone.h"
#include "js/GCVector.h"
#include "jsapi-tests/tests.h"

Просмотреть файл

@ -6,7 +6,6 @@
* file, You can obtain one at http://mozilla.org/MPL/2.0/. */
#include "gc/Barrier.h"
#include "gc/Zone.h"
#include "js/RootingAPI.h"
#include "jsapi-tests/tests.h"

Просмотреть файл

@ -5,7 +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 "gc/Zone.h"
#include "jsapi-tests/tests.h"
#include "vm/JSContext-inl.h"

Просмотреть файл

@ -219,7 +219,7 @@ JS_ScriptHasMutedErrors(JSScript* script)
}
JS_FRIEND_API(bool)
JS_WrapPropertyDescriptor(JSContext* cx, JS::MutableHandle<js::PropertyDescriptor> desc)
JS_WrapPropertyDescriptor(JSContext* cx, JS::MutableHandle<JS::PropertyDescriptor> desc)
{
return cx->compartment()->wrap(cx, desc);
}

Просмотреть файл

@ -71,7 +71,6 @@
#endif // defined(JS_BUILD_BINAST)
#include "frontend/Parser.h"
#include "gc/PublicIterators.h"
#include "gc/Zone.h"
#include "jit/arm/Simulator-arm.h"
#include "jit/InlinableNatives.h"
#include "jit/Ion.h"
@ -4310,7 +4309,7 @@ EnsureModuleLoaderScriptObjectMap(JSContext* cx)
if (priv->moduleLoaderScriptObjectMap)
return priv->moduleLoaderScriptObjectMap.get();
Zone* zone = cx->zone();
JS::Zone* zone = cx->zone();
auto* map = cx->new_<ScriptObjectMap>(zone);
if (!map)
return nullptr;

Просмотреть файл

@ -348,7 +348,7 @@ Compartment::rewrap(JSContext* cx, MutableHandleObject obj, HandleObject existin
}
bool
Compartment::wrap(JSContext* cx, MutableHandle<PropertyDescriptor> desc)
Compartment::wrap(JSContext* cx, MutableHandle<JS::PropertyDescriptor> desc)
{
if (!wrap(cx, desc.object()))
return false;

Просмотреть файл

@ -17,13 +17,14 @@
#include "gc/Barrier.h"
#include "gc/NurseryAwareHashMap.h"
#include "gc/Zone.h"
#include "js/UniquePtr.h"
#include "vm/JSObject.h"
#include "vm/JSScript.h"
namespace js {
namespace gc {
template <typename Node, typename Derived> class ComponentFinder;
struct ZoneComponentFinder;
} // namespace gc
class CrossCompartmentKey
@ -446,7 +447,7 @@ class JS::Compartment
MOZ_MUST_USE bool wrap(JSContext* cx, js::MutableHandle<JS::BigInt*> bi);
#endif
MOZ_MUST_USE bool wrap(JSContext* cx, JS::MutableHandleObject obj);
MOZ_MUST_USE bool wrap(JSContext* cx, JS::MutableHandle<js::PropertyDescriptor> desc);
MOZ_MUST_USE bool wrap(JSContext* cx, JS::MutableHandle<JS::PropertyDescriptor> desc);
MOZ_MUST_USE bool wrap(JSContext* cx, JS::MutableHandle<JS::GCVector<JS::Value>> vec);
MOZ_MUST_USE bool rewrap(JSContext* cx, JS::MutableHandleObject obj, JS::HandleObject existing);

Просмотреть файл

@ -17,7 +17,6 @@
#include "vm/ErrorObject.h"
#include "vm/JSFunction.h"
#include "vm/Realm.h"
#include "vm/RegExpStatics.h"
#include "vm/Runtime.h"
namespace js {
@ -25,6 +24,7 @@ namespace js {
class Debugger;
class TypedObjectModuleObject;
class LexicalEnvironmentObject;
class RegExpStatics;
/*
* Global object slots are reserved as follows:

Просмотреть файл

@ -16,7 +16,6 @@
#include "gc/HashUtil.h"
#include "gc/Policy.h"
#include "gc/StoreBuffer.h"
#include "gc/Zone.h"
#include "js/CharacterEncoding.h"
#include "js/UniquePtr.h"
#include "vm/ArrayObject.h"

Просмотреть файл

@ -20,7 +20,6 @@
#include "builtin/Array.h"
#include "gc/Barrier.h"
#include "gc/Zone.h"
#include "js/UniquePtr.h"
#include "vm/ArrayBufferObject.h"
#include "vm/Compartment.h"

Просмотреть файл

@ -0,0 +1,42 @@
/* -*- 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 vm_RegExpConstants_h
#define vm_RegExpConstants_h
#include "builtin/SelfHostingDefines.h"
namespace js {
enum RegExpFlag : uint8_t
{
IgnoreCaseFlag = 0x01,
GlobalFlag = 0x02,
MultilineFlag = 0x04,
StickyFlag = 0x08,
UnicodeFlag = 0x10,
NoFlags = 0x00,
AllFlags = 0x1f
};
static_assert(IgnoreCaseFlag == REGEXP_IGNORECASE_FLAG &&
GlobalFlag == REGEXP_GLOBAL_FLAG &&
MultilineFlag == REGEXP_MULTILINE_FLAG &&
StickyFlag == REGEXP_STICKY_FLAG &&
UnicodeFlag == REGEXP_UNICODE_FLAG,
"Flag values should be in sync with self-hosted JS");
enum RegExpRunStatus
{
RegExpRunStatus_Error,
RegExpRunStatus_Success,
RegExpRunStatus_Success_NotFound
};
} /* namespace js */
#endif /* vm_RegExpConstants_h */

Просмотреть файл

@ -15,7 +15,6 @@
#include "mozilla/Assertions.h"
#include "mozilla/MemoryReporting.h"
#include "builtin/SelfHostingDefines.h"
#include "gc/Barrier.h"
#include "gc/Heap.h"
#include "gc/Marking.h"
@ -25,6 +24,7 @@
#include "js/Vector.h"
#include "vm/ArrayObject.h"
#include "vm/JSAtom.h"
#include "vm/RegExpConstants.h"
namespace js {
@ -38,32 +38,6 @@ using RootedRegExpShared = JS::Rooted<RegExpShared*>;
using HandleRegExpShared = JS::Handle<RegExpShared*>;
using MutableHandleRegExpShared = JS::MutableHandle<RegExpShared*>;
enum RegExpFlag : uint8_t
{
IgnoreCaseFlag = 0x01,
GlobalFlag = 0x02,
MultilineFlag = 0x04,
StickyFlag = 0x08,
UnicodeFlag = 0x10,
NoFlags = 0x00,
AllFlags = 0x1f
};
static_assert(IgnoreCaseFlag == REGEXP_IGNORECASE_FLAG &&
GlobalFlag == REGEXP_GLOBAL_FLAG &&
MultilineFlag == REGEXP_MULTILINE_FLAG &&
StickyFlag == REGEXP_STICKY_FLAG &&
UnicodeFlag == REGEXP_UNICODE_FLAG,
"Flag values should be in sync with self-hosted JS");
enum RegExpRunStatus
{
RegExpRunStatus_Error,
RegExpRunStatus_Success,
RegExpRunStatus_Success_NotFound
};
/*
* A RegExpShared is the compiled representation of a regexp. A RegExpShared is
* potentially pointed to by multiple RegExpObjects. Additionally, C++ code may

Просмотреть файл

@ -8,7 +8,6 @@
#define vm_UnboxedObject_h
#include "gc/DeletePolicy.h"
#include "gc/Zone.h"
#include "vm/JSObject.h"
#include "vm/Runtime.h"
#include "vm/TypeInference.h"
@ -59,7 +58,7 @@ class UnboxedLayout : public mozilla::LinkedListElement<UnboxedLayout>
typedef Vector<Property, 0, SystemAllocPolicy> PropertyVector;
private:
Zone* zone_;
JS::Zone* zone_;
// If objects in this group have ever been converted to native objects,
// these store the corresponding native group and initial shape for such
@ -99,13 +98,13 @@ class UnboxedLayout : public mozilla::LinkedListElement<UnboxedLayout>
GCPtrJitCode constructorCode_;
public:
explicit UnboxedLayout(Zone* zone)
explicit UnboxedLayout(JS::Zone* zone)
: zone_(zone), nativeGroup_(nullptr), nativeShape_(nullptr),
allocationScript_(nullptr), allocationPc_(nullptr), replacementGroup_(nullptr),
size_(0), newScript_(nullptr), traceList_(nullptr), constructorCode_(nullptr)
{}
Zone* zone() const { return zone_; }
JS::Zone* zone() const { return zone_; }
bool initProperties(const PropertyVector& properties, size_t size) {
size_ = size;