Bug 1289987 - Part 3: Remove curly braces workaround for VS2013 ICE in ranged for loops in js/. r=fitzgen

This commit is contained in:
Chris Peterson 2016-07-28 22:23:10 -07:00
Родитель 617a320dfb
Коммит aab004d66f
8 изменённых файлов: 16 добавлений и 32 удалений

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

@ -126,9 +126,8 @@ struct Zone
barrierTracer_(barrierTracerArg),
needsIncrementalBarrier_(false)
{
for (auto& stackRootPtr : stackRoots_) {
for (auto& stackRootPtr : stackRoots_)
stackRootPtr = nullptr;
}
}
bool needsIncrementalBarrier() const {

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

@ -220,9 +220,8 @@ class FunctionCompiler
MOZ_ASSERT(loopDepth_ == 0);
MOZ_ASSERT(blockDepth_ == 0);
#ifdef DEBUG
for (ControlFlowPatchVector& patches : blockPatches_) {
for (ControlFlowPatchVector& patches : blockPatches_)
MOZ_ASSERT(patches.empty());
}
#endif
MOZ_ASSERT(inDeadCode());
MOZ_ASSERT(done(), "all bytes must be consumed");

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

@ -263,9 +263,8 @@ BEGIN_TEST(testGCRootedVector)
}
// Ensure iterator enumeration works through the rooted.
for (auto shape : shapes) {
for (auto shape : shapes)
CHECK(shape);
}
CHECK(receiveConstRefToShapeVector(shapes));
@ -280,9 +279,8 @@ bool
receiveConstRefToShapeVector(const JS::Rooted<GCVector<Shape*>>& rooted)
{
// Ensure range enumeration works through the reference.
for (auto shape : rooted) {
for (auto shape : rooted)
CHECK(shape);
}
return true;
}
@ -290,9 +288,8 @@ bool
receiveHandleToShapeVector(JS::Handle<GCVector<Shape*>> handle)
{
// Ensure range enumeration works through the handle.
for (auto shape : handle) {
for (auto shape : handle)
CHECK(shape);
}
return true;
}
@ -300,9 +297,8 @@ bool
receiveMutableHandleToShapeVector(JS::MutableHandle<GCVector<Shape*>> handle)
{
// Ensure range enumeration works through the handle.
for (auto shape : handle) {
for (auto shape : handle)
CHECK(shape);
}
return true;
}
END_TEST(testGCRootedVector)

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

@ -81,9 +81,8 @@ BEGIN_TEST(testSharedImmutableStringsCache)
threads.infallibleAppend(thread);
}
for (auto thread : threads) {
for (auto thread : threads)
CHECK(PR_JoinThread(thread) == PR_SUCCESS);
}
return true;
}

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

@ -140,9 +140,8 @@ js::DestroyContext(JSContext* cx)
void
RootLists::checkNoGCRooters() {
#ifdef DEBUG
for (auto const& stackRootPtr : stackRoots_) {
for (auto const& stackRootPtr : stackRoots_)
MOZ_ASSERT(stackRootPtr == nullptr);
}
#endif
}

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

@ -1426,9 +1426,8 @@ GCRuntime::removeFinalizeCallback(JSFinalizeCallback callback)
void
GCRuntime::callFinalizeCallbacks(FreeOp* fop, JSFinalizeStatus status) const
{
for (auto& p : finalizeCallbacks) {
for (auto& p : finalizeCallbacks)
p.op(fop, status, !isFull, p.data);
}
}
bool
@ -1452,9 +1451,8 @@ GCRuntime::removeWeakPointerZoneGroupCallback(JSWeakPointerZoneGroupCallback cal
void
GCRuntime::callWeakPointerZoneGroupCallbacks() const
{
for (auto const& p : updateWeakPointerZoneGroupCallbacks) {
for (auto const& p : updateWeakPointerZoneGroupCallbacks)
p.op(rt->contextFromMainThread(), p.data);
}
}
bool
@ -1478,9 +1476,8 @@ GCRuntime::removeWeakPointerCompartmentCallback(JSWeakPointerCompartmentCallback
void
GCRuntime::callWeakPointerCompartmentCallbacks(JSCompartment* comp) const
{
for (auto const& p : updateWeakPointerCompartmentCallbacks) {
for (auto const& p : updateWeakPointerCompartmentCallbacks)
p.op(rt->contextFromMainThread(), comp, p.data);
}
}
JS::GCSliceCallback
@ -2054,9 +2051,8 @@ ArenaLists::relocateArenas(Zone* zone, Arena*& relocatedListOut, JS::gcreason::R
size_t relocCount = 0;
AllAllocKindArray<Arena**> toRelocate;
for (auto kind : AllocKindsToRelocate) {
for (auto kind : AllocKindsToRelocate)
toRelocate[kind] = arenaLists[kind].pickArenasToRelocate(arenaCount, relocCount);
}
if (!ShouldRelocateZone(arenaCount, relocCount, reason))
return false;
@ -2824,9 +2820,8 @@ ArenaLists::queueForegroundObjectsForSweep(FreeOp* fop)
gcstats::AutoPhase ap(fop->runtime()->gc.stats, gcstats::PHASE_SWEEP_OBJECT);
#ifdef DEBUG
for (auto i : ObjectAllocKinds()) { // Braces needed to appease MSVC 2013.
for (auto i : ObjectAllocKinds())
MOZ_ASSERT(savedObjectArenas[i].isEmpty());
}
MOZ_ASSERT(savedEmptyObjectArenas == nullptr);
#endif
@ -3785,9 +3780,8 @@ GCRuntime::beginMarkPhase(JS::gcreason::Reason reason, AutoLockForExclusiveAcces
MOZ_ASSERT(!zone->isCollecting());
MOZ_ASSERT(!zone->compartments.empty());
#ifdef DEBUG
for (auto i : AllAllocKinds()) { // Braces needed to appease MSVC 2013.
for (auto i : AllAllocKinds())
MOZ_ASSERT(!zone->arenas.arenaListsToSweep[i]);
}
#endif
/* Set up which zones will be collected. */

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

@ -287,9 +287,8 @@ class RootLists
public:
RootLists() : autoGCRooters_(nullptr) {
for (auto& stackRootPtr : stackRoots_) {
for (auto& stackRootPtr : stackRoots_)
stackRootPtr = nullptr;
}
}
~RootLists() {

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

@ -89,9 +89,8 @@ WeakMapBase::sweepZone(JS::Zone* zone)
}
#ifdef DEBUG
for (WeakMapBase* m : zone->gcWeakMapList) {
for (WeakMapBase* m : zone->gcWeakMapList)
MOZ_ASSERT(m->isInList() && m->marked);
}
#endif
}