Skip to content

Commit

Permalink
Bug 1571660 - Tidy Zone class definition r=sfink
Browse files Browse the repository at this point in the history
Patch to move all data members together at the start of the class and a couple of other minor tidyups.

Differential Revision: https://phabricator.services.mozilla.com/D62592

--HG--
extra : moz-landing-system : lando
  • Loading branch information
jonco3 committed Feb 12, 2020
1 parent af2907c commit ca53578
Show file tree
Hide file tree
Showing 2 changed files with 221 additions and 261 deletions.
22 changes: 10 additions & 12 deletions js/src/gc/Zone.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -136,11 +136,17 @@ JS::Zone::Zone(JSRuntime* rt)
// ProtectedData checks in CheckZone::check may read this field.
helperThreadUse_(HelperThreadUse::None),
helperThreadOwnerContext_(nullptr),
uniqueIds_(this),
suppressAllocationMetadataBuilder(this, false),
arenas(this),
tenuredAllocsSinceMinorGC_(0),
types(this),
data(this, nullptr),
tenuredStrings(this, 0),
tenuredBigInts(this, 0),
allocNurseryStrings(this, true),
allocNurseryBigInts(this, true),
isSystem(this, false),
suppressAllocationMetadataBuilder(this, false),
uniqueIds_(this),
tenuredAllocsSinceMinorGC_(0),
gcWeakMapList_(this),
compartments_(),
crossZoneStringWrappers_(this),
Expand All @@ -156,19 +162,10 @@ JS::Zone::Zone(JSRuntime* rt)
functionToStringCache_(this),
keepAtomsCount(this, 0),
purgeAtomsDeferred(this, 0),
tenuredStrings(this, 0),
allocNurseryStrings(this, true),
tenuredBigInts(this, 0),
allocNurseryBigInts(this, true),
propertyTree_(this, this),
baseShapes_(this, this),
initialShapes_(this, this),
nurseryShapes_(this),
data(this, nullptr),
isSystem(this, false),
#ifdef DEBUG
gcSweepGroupIndex(0),
#endif
finalizationRecordMap_(this, this),
jitZone_(this, nullptr),
gcScheduled_(false),
Expand All @@ -182,6 +179,7 @@ JS::Zone::Zone(JSRuntime* rt)
/* Ensure that there are no vtables to mess us up here. */
MOZ_ASSERT(reinterpret_cast<JS::shadow::Zone*>(this) ==
static_cast<JS::shadow::Zone*>(this));
MOZ_ASSERT(gcSweepGroupIndex == 0);
}

Zone::~Zone() {
Expand Down
Loading

0 comments on commit ca53578

Please sign in to comment.