Bug 1452982 part 7 - Rename ZoneGroupData to ZoneData. r=jonco

This commit is contained in:
Jan de Mooij 2018-04-14 09:02:57 +02:00
parent 0f38ba4351
commit e269859a98
5 changed files with 42 additions and 42 deletions

View File

@ -222,7 +222,7 @@ class ArenaLists
* GC we only move the head of the of the list of spans back to the arena
* only for the arena that was not fully allocated.
*/
ZoneGroupData<AllAllocKindArray<FreeSpan*>> freeLists_;
ZoneData<AllAllocKindArray<FreeSpan*>> freeLists_;
AllAllocKindArray<FreeSpan*>& freeLists() { return freeLists_.ref(); }
const AllAllocKindArray<FreeSpan*>& freeLists() const { return freeLists_.ref(); }
@ -261,14 +261,14 @@ class ArenaLists
// Arena lists which have yet to be swept, but need additional foreground
// processing before they are swept.
ZoneGroupData<Arena*> gcShapeArenasToUpdate;
ZoneGroupData<Arena*> gcAccessorShapeArenasToUpdate;
ZoneGroupData<Arena*> gcScriptArenasToUpdate;
ZoneGroupData<Arena*> gcObjectGroupArenasToUpdate;
ZoneData<Arena*> gcShapeArenasToUpdate;
ZoneData<Arena*> gcAccessorShapeArenasToUpdate;
ZoneData<Arena*> gcScriptArenasToUpdate;
ZoneData<Arena*> gcObjectGroupArenasToUpdate;
// The list of empty arenas which are collected during sweep phase and released at the end of
// sweeping every sweep group.
ZoneGroupData<Arena*> savedEmptyArenas;
ZoneData<Arena*> savedEmptyArenas;
public:
explicit ArenaLists(JSRuntime* rt, JS::Zone* zone);

View File

@ -260,7 +260,7 @@ struct Zone : public JS::shadow::Zone,
using DebuggerVector = js::Vector<js::Debugger*, 0, js::SystemAllocPolicy>;
private:
js::ZoneGroupData<DebuggerVector*> debuggers;
js::ZoneData<DebuggerVector*> debuggers;
js::jit::JitZone* createJitZone(JSContext* cx);
@ -291,7 +291,7 @@ struct Zone : public JS::shadow::Zone,
* is silly
* And so on.
*/
js::ZoneGroupData<bool> suppressAllocationMetadataBuilder;
js::ZoneData<bool> suppressAllocationMetadataBuilder;
js::gc::ArenaLists arenas;
@ -365,7 +365,7 @@ struct Zone : public JS::shadow::Zone,
js::MovableCellHasher<JSObject*>,
js::SystemAllocPolicy>;
private:
js::ZoneGroupData<JS::WeakCache<TypeDescrObjectSet>> typeDescrObjects_;
js::ZoneData<JS::WeakCache<TypeDescrObjectSet>> typeDescrObjects_;
// Malloc counter to measure memory pressure for GC scheduling. This
// counter should be used only when it's not possible to know the size of
@ -470,18 +470,18 @@ struct Zone : public JS::shadow::Zone,
// the current GC.
js::UnprotectedData<size_t> gcDelayBytes;
js::ZoneGroupData<uint32_t> tenuredStrings;
js::ZoneGroupData<bool> allocNurseryStrings;
js::ZoneData<uint32_t> tenuredStrings;
js::ZoneData<bool> allocNurseryStrings;
private:
// Shared Shape property tree.
js::ZoneGroupData<js::PropertyTree> propertyTree_;
js::ZoneData<js::PropertyTree> propertyTree_;
public:
js::PropertyTree& propertyTree() { return propertyTree_.ref(); }
private:
// Set of all unowned base shapes in the Zone.
js::ZoneGroupData<js::BaseShapeSet> baseShapes_;
js::ZoneData<js::BaseShapeSet> baseShapes_;
public:
js::BaseShapeSet& baseShapes() { return baseShapes_.ref(); }
@ -490,14 +490,14 @@ struct Zone : public JS::shadow::Zone,
// those of various builtin classes -- there are two entries: one for a
// lookup via TaggedProto, and one for a lookup via JSProtoKey. See
// InitialShapeProto.
js::ZoneGroupData<js::InitialShapeSet> initialShapes_;
js::ZoneData<js::InitialShapeSet> initialShapes_;
public:
js::InitialShapeSet& initialShapes() { return initialShapes_.ref(); }
private:
// List of shapes that may contain nursery pointers.
using NurseryShapeVector = js::Vector<js::AccessorShape*, 0, js::SystemAllocPolicy>;
js::ZoneGroupData<NurseryShapeVector> nurseryShapes_;
js::ZoneData<NurseryShapeVector> nurseryShapes_;
public:
NurseryShapeVector& nurseryShapes() { return nurseryShapes_.ref(); }
@ -509,9 +509,9 @@ struct Zone : public JS::shadow::Zone,
void fixupAfterMovingGC();
// Per-zone data for use by an embedder.
js::ZoneGroupData<void*> data;
js::ZoneData<void*> data;
js::ZoneGroupData<bool> isSystem;
js::ZoneData<bool> isSystem;
private:
// The helper thread context with exclusive access to this zone, if
@ -556,7 +556,7 @@ struct Zone : public JS::shadow::Zone,
}
#ifdef DEBUG
js::ZoneGroupData<unsigned> gcLastSweepGroupIndex;
js::ZoneData<unsigned> gcLastSweepGroupIndex;
#endif
static js::HashNumber UniqueIdToHash(uint64_t uid) {
@ -703,12 +703,12 @@ struct Zone : public JS::shadow::Zone,
}
private:
js::ZoneGroupData<js::jit::JitZone*> jitZone_;
js::ZoneData<js::jit::JitZone*> jitZone_;
js::ActiveThreadData<bool> gcScheduled_;
js::ActiveThreadData<bool> gcScheduledSaved_;
js::ZoneGroupData<bool> gcPreserveCode_;
js::ZoneGroupData<bool> keepShapeTables_;
js::ZoneData<bool> gcPreserveCode_;
js::ZoneData<bool> keepShapeTables_;
// Allow zones to be linked into a list
friend class js::gc::ZoneList;

View File

@ -39,7 +39,7 @@ CheckThreadLocal::check() const
JSContext* cx = TlsContext.get();
MOZ_ASSERT(cx);
// As for CheckZoneGroup, in a cooperatively scheduled runtime the active
// As for CheckZone, in a cooperatively scheduled runtime the active
// thread is permitted access to thread local state for other suspended
// threads in the same runtime.
if (cx->isCooperativelyScheduled())
@ -65,7 +65,7 @@ template class CheckActiveThread<AllowedHelperThread::IonCompile>;
template <AllowedHelperThread Helper>
void
CheckZoneGroup<Helper>::check() const
CheckZone<Helper>::check() const
{
if (OnHelperThread<Helper>())
return;
@ -84,10 +84,10 @@ CheckZoneGroup<Helper>::check() const
}
}
template class CheckZoneGroup<AllowedHelperThread::None>;
template class CheckZoneGroup<AllowedHelperThread::GCTask>;
template class CheckZoneGroup<AllowedHelperThread::IonCompile>;
template class CheckZoneGroup<AllowedHelperThread::GCTaskOrIonCompile>;
template class CheckZone<AllowedHelperThread::None>;
template class CheckZone<AllowedHelperThread::GCTask>;
template class CheckZone<AllowedHelperThread::IonCompile>;
template class CheckZone<AllowedHelperThread::GCTaskOrIonCompile>;
template <GlobalLock Lock, AllowedHelperThread Helper>
void

View File

@ -224,17 +224,17 @@ using ActiveThreadOrIonCompileData =
ProtectedDataNoCheckArgs<CheckActiveThread<AllowedHelperThread::IonCompile>, T>;
template <AllowedHelperThread Helper>
class CheckZoneGroup
class CheckZone
{
#ifdef JS_HAS_PROTECTED_DATA_CHECKS
JS::Zone* zone;
public:
explicit CheckZoneGroup(JS::Zone* zone) : zone(zone) {}
explicit CheckZone(JS::Zone* zone) : zone(zone) {}
void check() const;
#else
public:
explicit CheckZoneGroup(JS::Zone* zone) {}
explicit CheckZone(JS::Zone* zone) {}
#endif
};
@ -242,20 +242,20 @@ class CheckZoneGroup
// associated zone group, or by the runtime's cooperatively scheduled
// active thread for zone groups which are not in use by a helper thread.
template <typename T>
using ZoneGroupData =
ProtectedDataZoneGroupArg<CheckZoneGroup<AllowedHelperThread::None>, T>;
using ZoneData =
ProtectedDataZoneGroupArg<CheckZone<AllowedHelperThread::None>, T>;
// Data which may only be accessed by threads with exclusive access to the
// associated zone group, or by various helper thread tasks.
template <typename T>
using ZoneGroupOrGCTaskData =
ProtectedDataZoneGroupArg<CheckZoneGroup<AllowedHelperThread::GCTask>, T>;
ProtectedDataZoneGroupArg<CheckZone<AllowedHelperThread::GCTask>, T>;
template <typename T>
using ZoneGroupOrIonCompileData =
ProtectedDataZoneGroupArg<CheckZoneGroup<AllowedHelperThread::IonCompile>, T>;
ProtectedDataZoneGroupArg<CheckZone<AllowedHelperThread::IonCompile>, T>;
template <typename T>
using ZoneGroupOrGCTaskOrIonCompileData =
ProtectedDataZoneGroupArg<CheckZoneGroup<AllowedHelperThread::GCTaskOrIonCompile>, T>;
ProtectedDataZoneGroupArg<CheckZone<AllowedHelperThread::GCTaskOrIonCompile>, T>;
// Runtime wide locks which might protect some data.
enum class GlobalLock

View File

@ -1338,10 +1338,10 @@ class TypeZone
/* Pool for type information in this zone. */
static const size_t TYPE_LIFO_ALLOC_PRIMARY_CHUNK_SIZE = 8 * 1024;
ZoneGroupData<LifoAlloc> typeLifoAlloc_;
ZoneData<LifoAlloc> typeLifoAlloc_;
// Under CodeGenerator::link, the id of the current compilation.
ZoneGroupData<mozilla::Maybe<IonCompilationId>> currentCompilationId_;
ZoneData<mozilla::Maybe<IonCompilationId>> currentCompilationId_;
TypeZone(const TypeZone&) = delete;
void operator=(const TypeZone&) = delete;
@ -1352,18 +1352,18 @@ class TypeZone
// During incremental sweeping, allocator holding the old type information
// for the zone.
ZoneGroupData<LifoAlloc> sweepTypeLifoAlloc;
ZoneData<LifoAlloc> sweepTypeLifoAlloc;
// During incremental sweeping, whether to try to destroy all type
// information attached to scripts.
ZoneGroupData<bool> sweepReleaseTypes;
ZoneData<bool> sweepReleaseTypes;
ZoneGroupData<bool> sweepingTypes;
ZoneData<bool> sweepingTypes;
ZoneGroupData<bool> keepTypeScripts;
ZoneData<bool> keepTypeScripts;
// The topmost AutoEnterAnalysis on the stack, if there is one.
ZoneGroupData<AutoEnterAnalysis*> activeAnalysis;
ZoneData<AutoEnterAnalysis*> activeAnalysis;
explicit TypeZone(JS::Zone* zone);
~TypeZone();