Tab to spaces newline and other such in js code

master
Fedor 2019-07-08 13:07:47 +03:00
parent ca72ef1006
commit 7a74bbaf96
11 changed files with 117 additions and 123 deletions

View File

@ -1527,9 +1527,10 @@ inline void
ArenaLists::prepareForIncrementalGC()
{
purge();
for (auto i : AllAllocKinds())
for (auto i : AllAllocKinds()) {
arenaLists[i].moveCursorToEnd();
}
}
/* Compacting GC */
@ -3577,8 +3578,8 @@ ShouldCollectZone(Zone* zone, JS::gcreason::Reason reason)
if (reason != JS::gcreason::COMPARTMENT_REVIVED)
return zone->isGCScheduled();
// If we are repeating a GC becuase we noticed dead compartments haven't
// been collected, then only collect zones contianing those compartments.
// If we are repeating a GC because we noticed dead compartments haven't
// been collected, then only collect zones containing those compartments.
for (CompartmentsInZoneIter comp(zone); !comp.done(); comp.next()) {
if (comp->scheduledForDestruction)
return true;
@ -3648,13 +3649,8 @@ GCRuntime::beginMarkPhase(JS::gcreason::Reason reason, AutoLockForExclusiveAcces
* keepAtoms() will only change on the main thread, which we are currently
* on. If the value of keepAtoms() changes between GC slices, then we'll
* cancel the incremental GC. See IsIncrementalGCSafe.
*/
if (isFull && !rt->keepAtoms()) {
Zone* atomsZone = rt->atomsCompartment(lock)->zone();
if (atomsZone->isGCScheduled()) {
@ -5689,10 +5685,6 @@ GCRuntime::gcCycle(bool nonincrementalByAPI, SliceBudget& budget, JS::gcreason::
State prevState = incrementalState;
if (nonincrementalByAPI) {
// Reset any in progress incremental GC if this was triggered via the
// API. This isn't required for correctness, but sometimes during tests

View File

@ -354,6 +354,7 @@ struct SortedArenaListSegment
* be treated as an invariant, however, as the free lists may be cleared,
* leaving arenas previously used for allocation partially full. Sorting order
* is restored during sweeping.
* Arenas following the cursor should not be full.
*/
class ArenaList {
@ -455,9 +456,10 @@ class ArenaList {
}
void moveCursorToEnd() {
while (!isCursorAtEnd())
while (!isCursorAtEnd()) {
cursorp_ = &(*cursorp_)->next;
}
}
// This can return nullptr.
Arena* arenaAfterCursor() const {