<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[210023] trunk/Source/JavaScriptCore</title>
</head>
<body>
<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; }
#msg dl a { font-weight: bold}
#msg dl a:link { color:#fc3; }
#msg dl a:active { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/210023">210023</a></dd>
<dt>Author</dt> <dd>annulen@yandex.ru</dd>
<dt>Date</dt> <dd>2016-12-20 10:26:10 -0800 (Tue, 20 Dec 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>Modernize for loops in JSC
https://bugs.webkit.org/show_bug.cgi?id=166060
Reviewed by Yusuke Suzuki.
* API/JSCallbackObject.h:
(JSC::JSCallbackObjectData::JSPrivatePropertyMap::visitChildren):
* bytecode/CodeBlock.cpp:
(JSC::CodeBlock::dumpBytecode):
(JSC::CodeBlock::propagateTransitions):
(JSC::CodeBlock::stronglyVisitStrongReferences):
(JSC::CodeBlock::stronglyVisitWeakReferences):
(JSC::CodeBlock::jettison):
(JSC::CodeBlock::getArrayProfile):
(JSC::CodeBlock::tallyFrequentExitSites):
(JSC::CodeBlock::nameForRegister):
* bytecompiler/BytecodeGenerator.cpp:
(JSC::BytecodeGenerator::generate):
(JSC::BytecodeGenerator::BytecodeGenerator):
* bytecompiler/NodesCodegen.cpp:
(JSC::ObjectPatternNode::bindValue):
* debugger/Debugger.cpp:
(JSC::Debugger::applyBreakpoints):
* dfg/DFGCPSRethreadingPhase.cpp:
(JSC::DFG::CPSRethreadingPhase::canonicalizeLocalsInBlock):
* dfg/DFGClobberSet.cpp:
(JSC::DFG::ClobberSet::setOf):
* dfg/DFGDesiredIdentifiers.cpp:
(JSC::DFG::DesiredIdentifiers::reallyAdd):
* dfg/DFGGraph.cpp:
(JSC::DFG::Graph::visitChildren):
* dfg/DFGIntegerCheckCombiningPhase.cpp:
(JSC::DFG::IntegerCheckCombiningPhase::handleBlock):
* dfg/DFGIntegerRangeOptimizationPhase.cpp:
* dfg/DFGJITCompiler.cpp:
(JSC::DFG::JITCompiler::link):
* dfg/DFGLICMPhase.cpp:
(JSC::DFG::LICMPhase::run):
* dfg/DFGMaximalFlushInsertionPhase.cpp:
(JSC::DFG::MaximalFlushInsertionPhase::treatRootBlock):
* dfg/DFGPutStackSinkingPhase.cpp:
* dfg/DFGSpeculativeJIT.cpp:
(JSC::DFG::SpeculativeJIT::compileCurrentBlock):
(JSC::DFG::SpeculativeJIT::linkBranches):
* dfg/DFGStructureRegistrationPhase.cpp:
(JSC::DFG::StructureRegistrationPhase::run):
* dfg/DFGTypeCheckHoistingPhase.cpp:
(JSC::DFG::TypeCheckHoistingPhase::identifyRedundantStructureChecks):
(JSC::DFG::TypeCheckHoistingPhase::identifyRedundantArrayChecks):
* dfg/DFGValidate.cpp:
* dfg/DFGVirtualRegisterAllocationPhase.cpp:
(JSC::DFG::VirtualRegisterAllocationPhase::run):
* heap/HeapVerifier.cpp:
(JSC::trimDeadObjectsFromList):
(JSC::HeapVerifier::trimDeadObjects):
* heap/LiveObjectList.cpp:
(JSC::LiveObjectList::findObject):
* heap/MarkedAllocator.cpp:
(JSC::MarkedAllocator::isPagedOut):
* inspector/ScriptCallStack.cpp:
(Inspector::ScriptCallStack::firstNonNativeCallFrame):
* jit/JIT.cpp:
(JSC::JIT::link):
* parser/VariableEnvironment.cpp:
(JSC::VariableEnvironment::markAllVariablesAsCaptured):
(JSC::VariableEnvironment::hasCapturedVariables):
* runtime/FunctionHasExecutedCache.cpp:
(JSC::FunctionHasExecutedCache::hasExecutedAtOffset):
(JSC::FunctionHasExecutedCache::getFunctionRanges):
* runtime/JSPropertyNameEnumerator.cpp:
(JSC::JSPropertyNameEnumerator::visitChildren):
* runtime/TypeProfiler.cpp:
(JSC::TypeProfiler::findLocation):
* runtime/TypeSet.cpp:
(JSC::TypeSet::addTypeInformation):
(JSC::TypeSet::dumpTypes):
* runtime/VM.cpp:
(JSC::VM::gatherConservativeRoots):
* runtime/WeakMapData.cpp:
(JSC::WeakMapData::DeadKeyCleaner::visitWeakReferences):
(JSC::WeakMapData::DeadKeyCleaner::finalizeUnconditionally):
* tools/ProfileTreeNode.h:
(JSC::ProfileTreeNode::dumpInternal):
* yarr/YarrInterpreter.cpp:
(JSC::Yarr::ByteCompiler::emitDisjunction):</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkSourceJavaScriptCoreAPIJSCallbackObjecth">trunk/Source/JavaScriptCore/API/JSCallbackObject.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecodeCodeBlockcpp">trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorcpp">trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorebytecompilerNodesCodegencpp">trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredebuggerDebuggercpp">trunk/Source/JavaScriptCore/debugger/Debugger.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGCPSRethreadingPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGCPSRethreadingPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGClobberSetcpp">trunk/Source/JavaScriptCore/dfg/DFGClobberSet.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGDesiredIdentifierscpp">trunk/Source/JavaScriptCore/dfg/DFGDesiredIdentifiers.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGGraphcpp">trunk/Source/JavaScriptCore/dfg/DFGGraph.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGIntegerCheckCombiningPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGIntegerCheckCombiningPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGIntegerRangeOptimizationPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGJITCompilercpp">trunk/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGLICMPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGLICMPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGMaximalFlushInsertionPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGMaximalFlushInsertionPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGPutStackSinkingPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGPutStackSinkingPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGSpeculativeJITcpp">trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGStructureRegistrationPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGStructureRegistrationPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGTypeCheckHoistingPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGTypeCheckHoistingPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGValidatecpp">trunk/Source/JavaScriptCore/dfg/DFGValidate.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoredfgDFGVirtualRegisterAllocationPhasecpp">trunk/Source/JavaScriptCore/dfg/DFGVirtualRegisterAllocationPhase.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapHeapVerifiercpp">trunk/Source/JavaScriptCore/heap/HeapVerifier.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapLiveObjectListcpp">trunk/Source/JavaScriptCore/heap/LiveObjectList.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreheapMarkedAllocatorcpp">trunk/Source/JavaScriptCore/heap/MarkedAllocator.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreinspectorScriptCallStackcpp">trunk/Source/JavaScriptCore/inspector/ScriptCallStack.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCorejitJITcpp">trunk/Source/JavaScriptCore/jit/JIT.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserVariableEnvironmentcpp">trunk/Source/JavaScriptCore/parser/VariableEnvironment.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeFunctionHasExecutedCachecpp">trunk/Source/JavaScriptCore/runtime/FunctionHasExecutedCache.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSPropertyNameEnumeratorcpp">trunk/Source/JavaScriptCore/runtime/JSPropertyNameEnumerator.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeTypeProfilercpp">trunk/Source/JavaScriptCore/runtime/TypeProfiler.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeTypeSetcpp">trunk/Source/JavaScriptCore/runtime/TypeSet.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeVMcpp">trunk/Source/JavaScriptCore/runtime/VM.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeWeakMapDatacpp">trunk/Source/JavaScriptCore/runtime/WeakMapData.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoretoolsProfileTreeNodeh">trunk/Source/JavaScriptCore/tools/ProfileTreeNode.h</a></li>
<li><a href="#trunkSourceJavaScriptCoreyarrYarrInterpretercpp">trunk/Source/JavaScriptCore/yarr/YarrInterpreter.cpp</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkSourceJavaScriptCoreAPIJSCallbackObjecth"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/API/JSCallbackObject.h (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/API/JSCallbackObject.h        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/API/JSCallbackObject.h        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -106,9 +106,9 @@
</span><span class="cx"> void visitChildren(SlotVisitor& visitor)
</span><span class="cx"> {
</span><span class="cx"> LockHolder locker(m_lock);
</span><del>- for (PrivatePropertyMap::iterator ptr = m_propertyMap.begin(); ptr != m_propertyMap.end(); ++ptr) {
- if (ptr->value)
- visitor.append(ptr->value);
</del><ins>+ for (auto& pair : m_propertyMap) {
+ if (pair.value)
+ visitor.append(pair.value);
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -1,5 +1,93 @@
</span><span class="cx"> 2016-12-20 Konstantin Tokarev <annulen@yandex.ru>
</span><span class="cx">
</span><ins>+ Modernize for loops in JSC
+ https://bugs.webkit.org/show_bug.cgi?id=166060
+
+ Reviewed by Yusuke Suzuki.
+
+ * API/JSCallbackObject.h:
+ (JSC::JSCallbackObjectData::JSPrivatePropertyMap::visitChildren):
+ * bytecode/CodeBlock.cpp:
+ (JSC::CodeBlock::dumpBytecode):
+ (JSC::CodeBlock::propagateTransitions):
+ (JSC::CodeBlock::stronglyVisitStrongReferences):
+ (JSC::CodeBlock::stronglyVisitWeakReferences):
+ (JSC::CodeBlock::jettison):
+ (JSC::CodeBlock::getArrayProfile):
+ (JSC::CodeBlock::tallyFrequentExitSites):
+ (JSC::CodeBlock::nameForRegister):
+ * bytecompiler/BytecodeGenerator.cpp:
+ (JSC::BytecodeGenerator::generate):
+ (JSC::BytecodeGenerator::BytecodeGenerator):
+ * bytecompiler/NodesCodegen.cpp:
+ (JSC::ObjectPatternNode::bindValue):
+ * debugger/Debugger.cpp:
+ (JSC::Debugger::applyBreakpoints):
+ * dfg/DFGCPSRethreadingPhase.cpp:
+ (JSC::DFG::CPSRethreadingPhase::canonicalizeLocalsInBlock):
+ * dfg/DFGClobberSet.cpp:
+ (JSC::DFG::ClobberSet::setOf):
+ * dfg/DFGDesiredIdentifiers.cpp:
+ (JSC::DFG::DesiredIdentifiers::reallyAdd):
+ * dfg/DFGGraph.cpp:
+ (JSC::DFG::Graph::visitChildren):
+ * dfg/DFGIntegerCheckCombiningPhase.cpp:
+ (JSC::DFG::IntegerCheckCombiningPhase::handleBlock):
+ * dfg/DFGIntegerRangeOptimizationPhase.cpp:
+ * dfg/DFGJITCompiler.cpp:
+ (JSC::DFG::JITCompiler::link):
+ * dfg/DFGLICMPhase.cpp:
+ (JSC::DFG::LICMPhase::run):
+ * dfg/DFGMaximalFlushInsertionPhase.cpp:
+ (JSC::DFG::MaximalFlushInsertionPhase::treatRootBlock):
+ * dfg/DFGPutStackSinkingPhase.cpp:
+ * dfg/DFGSpeculativeJIT.cpp:
+ (JSC::DFG::SpeculativeJIT::compileCurrentBlock):
+ (JSC::DFG::SpeculativeJIT::linkBranches):
+ * dfg/DFGStructureRegistrationPhase.cpp:
+ (JSC::DFG::StructureRegistrationPhase::run):
+ * dfg/DFGTypeCheckHoistingPhase.cpp:
+ (JSC::DFG::TypeCheckHoistingPhase::identifyRedundantStructureChecks):
+ (JSC::DFG::TypeCheckHoistingPhase::identifyRedundantArrayChecks):
+ * dfg/DFGValidate.cpp:
+ * dfg/DFGVirtualRegisterAllocationPhase.cpp:
+ (JSC::DFG::VirtualRegisterAllocationPhase::run):
+ * heap/HeapVerifier.cpp:
+ (JSC::trimDeadObjectsFromList):
+ (JSC::HeapVerifier::trimDeadObjects):
+ * heap/LiveObjectList.cpp:
+ (JSC::LiveObjectList::findObject):
+ * heap/MarkedAllocator.cpp:
+ (JSC::MarkedAllocator::isPagedOut):
+ * inspector/ScriptCallStack.cpp:
+ (Inspector::ScriptCallStack::firstNonNativeCallFrame):
+ * jit/JIT.cpp:
+ (JSC::JIT::link):
+ * parser/VariableEnvironment.cpp:
+ (JSC::VariableEnvironment::markAllVariablesAsCaptured):
+ (JSC::VariableEnvironment::hasCapturedVariables):
+ * runtime/FunctionHasExecutedCache.cpp:
+ (JSC::FunctionHasExecutedCache::hasExecutedAtOffset):
+ (JSC::FunctionHasExecutedCache::getFunctionRanges):
+ * runtime/JSPropertyNameEnumerator.cpp:
+ (JSC::JSPropertyNameEnumerator::visitChildren):
+ * runtime/TypeProfiler.cpp:
+ (JSC::TypeProfiler::findLocation):
+ * runtime/TypeSet.cpp:
+ (JSC::TypeSet::addTypeInformation):
+ (JSC::TypeSet::dumpTypes):
+ * runtime/VM.cpp:
+ (JSC::VM::gatherConservativeRoots):
+ * runtime/WeakMapData.cpp:
+ (JSC::WeakMapData::DeadKeyCleaner::visitWeakReferences):
+ (JSC::WeakMapData::DeadKeyCleaner::finalizeUnconditionally):
+ * tools/ProfileTreeNode.h:
+ (JSC::ProfileTreeNode::dumpInternal):
+ * yarr/YarrInterpreter.cpp:
+ (JSC::Yarr::ByteCompiler::emitDisjunction):
+
+2016-12-20 Konstantin Tokarev <annulen@yandex.ru>
+
</ins><span class="cx"> __cpuid() requires <intrin.h> to be included
</span><span class="cx"> https://bugs.webkit.org/show_bug.cgi?id=166051
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecodeCodeBlockcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/bytecode/CodeBlock.cpp        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -1769,8 +1769,8 @@
</span><span class="cx"> if (!exitSites.isEmpty()) {
</span><span class="cx"> out.print(" !! frequent exits: ");
</span><span class="cx"> CommaPrinter comma;
</span><del>- for (unsigned i = 0; i < exitSites.size(); ++i)
- out.print(comma, exitSites[i].kind(), " ", exitSites[i].jitType());
</del><ins>+ for (auto& exitSite : exitSites)
+ out.print(comma, exitSite.kind(), " ", exitSite.jitType());
</ins><span class="cx"> }
</span><span class="cx"> #else // ENABLE(DFG_JIT)
</span><span class="cx"> UNUSED_PARAM(location);
</span><span class="lines">@@ -2677,9 +2677,9 @@
</span><span class="cx"> DFG::CommonData* dfgCommon = m_jitCode->dfgCommon();
</span><span class="cx"> for (auto& weakReference : dfgCommon->weakStructureReferences)
</span><span class="cx"> allAreMarkedSoFar &= weakReference->markIfCheap(visitor);
</span><del>-
- for (unsigned i = 0; i < dfgCommon->transitions.size(); ++i) {
- if (shouldMarkTransition(dfgCommon->transitions[i])) {
</del><ins>+
+ for (auto& transition : dfgCommon->transitions) {
+ if (shouldMarkTransition(transition)) {
</ins><span class="cx"> // If the following three things are live, then the target of the
</span><span class="cx"> // transition is also live:
</span><span class="cx"> //
</span><span class="lines">@@ -2698,8 +2698,8 @@
</span><span class="cx"> // We also short-circuit the liveness if the structure is harmless
</span><span class="cx"> // to mark (i.e. its global object and prototype are both already
</span><span class="cx"> // live).
</span><del>-
- visitor.append(dfgCommon->transitions[i].m_to);
</del><ins>+
+ visitor.append(transition.m_to);
</ins><span class="cx"> } else
</span><span class="cx"> allAreMarkedSoFar = false;
</span><span class="cx"> }
</span><span class="lines">@@ -3068,12 +3068,12 @@
</span><span class="cx"> if (m_rareData)
</span><span class="cx"> m_rareData->m_directEvalCodeCache.visitAggregate(visitor);
</span><span class="cx"> visitor.appendValues(m_constantRegisters.data(), m_constantRegisters.size());
</span><del>- for (size_t i = 0; i < m_functionExprs.size(); ++i)
- visitor.append(m_functionExprs[i]);
- for (size_t i = 0; i < m_functionDecls.size(); ++i)
- visitor.append(m_functionDecls[i]);
- for (unsigned i = 0; i < m_objectAllocationProfiles.size(); ++i)
- m_objectAllocationProfiles[i].visitAggregate(visitor);
</del><ins>+ for (auto& functionExpr : m_functionExprs)
+ visitor.append(functionExpr);
+ for (auto& functionDecl : m_functionDecls)
+ visitor.append(functionDecl);
+ for (auto& objectAllocationProfile : m_objectAllocationProfiles)
+ objectAllocationProfile.visitAggregate(visitor);
</ins><span class="cx">
</span><span class="cx"> #if ENABLE(JIT)
</span><span class="cx"> for (ByValInfo* byValInfo : m_byValInfos)
</span><span class="lines">@@ -3096,19 +3096,19 @@
</span><span class="cx">
</span><span class="cx"> DFG::CommonData* dfgCommon = m_jitCode->dfgCommon();
</span><span class="cx">
</span><del>- for (unsigned i = 0; i < dfgCommon->transitions.size(); ++i) {
- if (!!dfgCommon->transitions[i].m_codeOrigin)
- visitor.append(dfgCommon->transitions[i].m_codeOrigin); // Almost certainly not necessary, since the code origin should also be a weak reference. Better to be safe, though.
- visitor.append(dfgCommon->transitions[i].m_from);
- visitor.append(dfgCommon->transitions[i].m_to);
</del><ins>+ for (auto& transition : dfgCommon->transitions) {
+ if (!!transition.m_codeOrigin)
+ visitor.append(transition.m_codeOrigin); // Almost certainly not necessary, since the code origin should also be a weak reference. Better to be safe, though.
+ visitor.append(transition.m_from);
+ visitor.append(transition.m_to);
</ins><span class="cx"> }
</span><del>-
- for (unsigned i = 0; i < dfgCommon->weakReferences.size(); ++i)
- visitor.append(dfgCommon->weakReferences[i]);
</del><span class="cx">
</span><del>- for (unsigned i = 0; i < dfgCommon->weakStructureReferences.size(); ++i)
- visitor.append(dfgCommon->weakStructureReferences[i]);
</del><ins>+ for (auto& weakReference : dfgCommon->weakReferences)
+ visitor.append(weakReference);
</ins><span class="cx">
</span><ins>+ for (auto& weakStructureReference : dfgCommon->weakStructureReferences)
+ visitor.append(weakStructureReference);
+
</ins><span class="cx"> dfgCommon->livenessHasBeenProved = true;
</span><span class="cx"> #endif
</span><span class="cx"> }
</span><span class="lines">@@ -3376,8 +3376,7 @@
</span><span class="cx"> if (DFG::shouldDumpDisassembly()) {
</span><span class="cx"> dataLog(*this, " will be jettisoned because of the following dead references:\n");
</span><span class="cx"> DFG::CommonData* dfgCommon = m_jitCode->dfgCommon();
</span><del>- for (unsigned i = 0; i < dfgCommon->transitions.size(); ++i) {
- DFG::WeakReferenceTransition& transition = dfgCommon->transitions[i];
</del><ins>+ for (auto& transition : dfgCommon->transitions) {
</ins><span class="cx"> JSCell* origin = transition.m_codeOrigin.get();
</span><span class="cx"> JSCell* from = transition.m_from.get();
</span><span class="cx"> JSCell* to = transition.m_to.get();
</span><span class="lines">@@ -3906,9 +3905,9 @@
</span><span class="cx">
</span><span class="cx"> ArrayProfile* CodeBlock::getArrayProfile(const ConcurrentJSLocker&, unsigned bytecodeOffset)
</span><span class="cx"> {
</span><del>- for (unsigned i = 0; i < m_arrayProfiles.size(); ++i) {
- if (m_arrayProfiles[i].bytecodeOffset() == bytecodeOffset)
- return &m_arrayProfiles[i];
</del><ins>+ for (auto& m_arrayProfile : m_arrayProfiles) {
+ if (m_arrayProfile.bytecodeOffset() == bytecodeOffset)
+ return &m_arrayProfile;
</ins><span class="cx"> }
</span><span class="cx"> return 0;
</span><span class="cx"> }
</span><span class="lines">@@ -4064,10 +4063,8 @@
</span><span class="cx"> switch (jitType()) {
</span><span class="cx"> case JITCode::DFGJIT: {
</span><span class="cx"> DFG::JITCode* jitCode = m_jitCode->dfg();
</span><del>- for (unsigned i = 0; i < jitCode->osrExit.size(); ++i) {
- DFG::OSRExit& exit = jitCode->osrExit[i];
</del><ins>+ for (auto& exit : jitCode->osrExit)
</ins><span class="cx"> exit.considerAddingAsFrequentExitSite(profiledBlock);
</span><del>- }
</del><span class="cx"> break;
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -4205,10 +4202,10 @@
</span><span class="cx">
</span><span class="cx"> String CodeBlock::nameForRegister(VirtualRegister virtualRegister)
</span><span class="cx"> {
</span><del>- for (unsigned i = 0; i < m_constantRegisters.size(); i++) {
- if (m_constantRegisters[i].get().isEmpty())
</del><ins>+ for (auto& constantRegister : m_constantRegisters) {
+ if (constantRegister.get().isEmpty())
</ins><span class="cx"> continue;
</span><del>- if (SymbolTable* symbolTable = jsDynamicCast<SymbolTable*>(m_constantRegisters[i].get())) {
</del><ins>+ if (SymbolTable* symbolTable = jsDynamicCast<SymbolTable*>(constantRegister.get())) {
</ins><span class="cx"> ConcurrentJSLocker locker(symbolTable->m_lock);
</span><span class="cx"> auto end = symbolTable->end(locker);
</span><span class="cx"> for (auto ptr = symbolTable->begin(locker); ptr != end; ++ptr) {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerBytecodeGeneratorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/bytecompiler/BytecodeGenerator.cpp        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -126,8 +126,7 @@
</span><span class="cx">
</span><span class="cx"> m_staticPropertyAnalyzer.kill();
</span><span class="cx">
</span><del>- for (unsigned i = 0; i < m_tryRanges.size(); ++i) {
- TryRange& range = m_tryRanges[i];
</del><ins>+ for (auto& range : m_tryRanges) {
</ins><span class="cx"> int start = range.start->bind();
</span><span class="cx"> int end = range.end->bind();
</span><span class="cx">
</span><span class="lines">@@ -201,10 +200,9 @@
</span><span class="cx">
</span><span class="cx"> const FunctionStack& functionStack = programNode->functionStack();
</span><span class="cx">
</span><del>- for (size_t i = 0; i < functionStack.size(); ++i) {
- FunctionMetadataNode* function = functionStack[i];
</del><ins>+ for (auto* function : functionStack)
</ins><span class="cx"> m_functionsToInitialize.append(std::make_pair(function, GlobalFunctionVariable));
</span><del>- }
</del><ins>+
</ins><span class="cx"> if (Options::validateBytecode()) {
</span><span class="cx"> for (auto& entry : programNode->varDeclarations())
</span><span class="cx"> RELEASE_ASSERT(entry.value.isVar());
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorebytecompilerNodesCodegencpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -3962,8 +3962,7 @@
</span><span class="cx"> void ObjectPatternNode::bindValue(BytecodeGenerator& generator, RegisterID* rhs) const
</span><span class="cx"> {
</span><span class="cx"> generator.emitRequireObjectCoercible(rhs, ASCIILiteral("Right side of assignment cannot be destructured"));
</span><del>- for (size_t i = 0; i < m_targetPatterns.size(); i++) {
- auto& target = m_targetPatterns[i];
</del><ins>+ for (const auto& target : m_targetPatterns) {
</ins><span class="cx"> RefPtr<RegisterID> temp = generator.newTemporary();
</span><span class="cx"> if (!target.propertyExpression) {
</span><span class="cx"> // Should not emit get_by_id for indexed ones.
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredebuggerDebuggercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/debugger/Debugger.cpp (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/debugger/Debugger.cpp        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/debugger/Debugger.cpp        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -295,10 +295,8 @@
</span><span class="cx"> void Debugger::applyBreakpoints(CodeBlock* codeBlock)
</span><span class="cx"> {
</span><span class="cx"> BreakpointIDToBreakpointMap& breakpoints = m_breakpointIDToBreakpoint;
</span><del>- for (auto it = breakpoints.begin(); it != breakpoints.end(); ++it) {
- Breakpoint& breakpoint = *it->value;
- toggleBreakpoint(codeBlock, breakpoint, BreakpointEnabled);
- }
</del><ins>+ for (auto* breakpoint : breakpoints.values())
+ toggleBreakpoint(codeBlock, *breakpoint, BreakpointEnabled);
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> class Debugger::ToggleBreakpointFunctor {
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGCPSRethreadingPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGCPSRethreadingPhase.cpp (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGCPSRethreadingPhase.cpp        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/dfg/DFGCPSRethreadingPhase.cpp        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -291,9 +291,7 @@
</span><span class="cx"> // but not logicalRefCount == actualRefCount). Assumes that it can break ref
</span><span class="cx"> // counts.
</span><span class="cx">
</span><del>- for (unsigned nodeIndex = 0; nodeIndex < m_block->size(); ++nodeIndex) {
- Node* node = m_block->at(nodeIndex);
-
</del><ins>+ for (auto* node : *m_block) {
</ins><span class="cx"> m_graph.performSubstitution(node);
</span><span class="cx">
</span><span class="cx"> // The rules for threaded CPS form:
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGClobberSetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGClobberSet.cpp (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGClobberSet.cpp        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/dfg/DFGClobberSet.cpp        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -129,9 +129,9 @@
</span><span class="cx"> HashSet<AbstractHeap> ClobberSet::setOf(bool direct) const
</span><span class="cx"> {
</span><span class="cx"> HashSet<AbstractHeap> result;
</span><del>- for (HashMap<AbstractHeap, bool>::const_iterator iter = m_clobbers.begin(); iter != m_clobbers.end(); ++iter) {
- if (iter->value == direct)
- result.add(iter->key);
</del><ins>+ for (auto& clobber : m_clobbers) {
+ if (clobber.value == direct)
+ result.add(clobber.key);
</ins><span class="cx"> }
</span><span class="cx"> return result;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGDesiredIdentifierscpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGDesiredIdentifiers.cpp (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGDesiredIdentifiers.cpp        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/dfg/DFGDesiredIdentifiers.cpp        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -87,8 +87,7 @@
</span><span class="cx">
</span><span class="cx"> void DesiredIdentifiers::reallyAdd(VM& vm, CommonData* commonData)
</span><span class="cx"> {
</span><del>- for (unsigned i = 0; i < m_addedIdentifiers.size(); ++i) {
- auto rep = m_addedIdentifiers[i];
</del><ins>+ for (auto rep : m_addedIdentifiers) {
</ins><span class="cx"> ASSERT(rep->hasAtLeastOneRef());
</span><span class="cx"> commonData->dfgIdentifiers.append(Identifier::fromUid(&vm, rep));
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGGraphcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGGraph.cpp (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGGraph.cpp        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/dfg/DFGGraph.cpp        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -1419,9 +1419,7 @@
</span><span class="cx"> if (!block)
</span><span class="cx"> continue;
</span><span class="cx">
</span><del>- for (unsigned nodeIndex = 0; nodeIndex < block->size(); ++nodeIndex) {
- Node* node = block->at(nodeIndex);
-
</del><ins>+ for (auto* node : *block) {
</ins><span class="cx"> switch (node->op()) {
</span><span class="cx"> case CheckStructure:
</span><span class="cx"> for (unsigned i = node->structureSet().size(); i--;)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGIntegerCheckCombiningPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGIntegerCheckCombiningPhase.cpp (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGIntegerCheckCombiningPhase.cpp        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/dfg/DFGIntegerCheckCombiningPhase.cpp        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -192,8 +192,7 @@
</span><span class="cx"> // First we collect Ranges. If operations within the range have enough redundancy,
</span><span class="cx"> // we hoist. And then we remove additions and checks that fall within the max range.
</span><span class="cx">
</span><del>- for (unsigned nodeIndex = 0; nodeIndex < block->size(); ++nodeIndex) {
- Node* node = block->at(nodeIndex);
</del><ins>+ for (auto* node : *block) {
</ins><span class="cx"> RangeKeyAndAddend data = rangeKeyAndAddend(node);
</span><span class="cx"> if (verbose)
</span><span class="cx"> dataLog("For ", node, ": ", data, "\n");
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGIntegerRangeOptimizationPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/dfg/DFGIntegerRangeOptimizationPhase.cpp        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -1109,8 +1109,7 @@
</span><span class="cx">
</span><span class="cx"> m_relationships = m_relationshipsAtHead[block];
</span><span class="cx">
</span><del>- for (unsigned nodeIndex = 0; nodeIndex < block->size(); ++nodeIndex) {
- Node* node = block->at(nodeIndex);
</del><ins>+ for (auto* node : *block) {
</ins><span class="cx"> if (verbose)
</span><span class="cx"> dataLog("Analysis: at ", node, ": ", listDump(sortedRelationships()), "\n");
</span><span class="cx"> executeNode(node);
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGJITCompilercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/dfg/DFGJITCompiler.cpp        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -274,8 +274,7 @@
</span><span class="cx"> start, linkBuffer.locationOf(m_ins[i].m_slowPathGenerator->label()));
</span><span class="cx"> }
</span><span class="cx">
</span><del>- for (unsigned i = 0; i < m_jsCalls.size(); ++i) {
- JSCallRecord& record = m_jsCalls[i];
</del><ins>+ for (auto& record : m_jsCalls) {
</ins><span class="cx"> CallLinkInfo& info = *record.info;
</span><span class="cx"> linkBuffer.link(record.slowCall, FunctionPtr(m_vm->getCTIStub(linkCallThunkGenerator).code().executableAddress()));
</span><span class="cx"> info.setCallLocations(
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGLICMPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGLICMPhase.cpp (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGLICMPhase.cpp        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/dfg/DFGLICMPhase.cpp        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -102,9 +102,7 @@
</span><span class="cx"> if (!loop)
</span><span class="cx"> continue;
</span><span class="cx"> LoopData& data = m_data[loop->index()];
</span><del>- for (unsigned nodeIndex = 0; nodeIndex < block->size(); ++nodeIndex) {
- Node* node = block->at(nodeIndex);
-
</del><ins>+ for (auto* node : *block) {
</ins><span class="cx"> // Don't look beyond parts of the code that definitely always exit.
</span><span class="cx"> // FIXME: This shouldn't be needed.
</span><span class="cx"> // https://bugs.webkit.org/show_bug.cgi?id=128584
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGMaximalFlushInsertionPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGMaximalFlushInsertionPhase.cpp (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGMaximalFlushInsertionPhase.cpp        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/dfg/DFGMaximalFlushInsertionPhase.cpp        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -108,8 +108,7 @@
</span><span class="cx"> {
</span><span class="cx"> Operands<VariableAccessData*> initialAccessData(block->variablesAtTail.numberOfArguments(), block->variablesAtTail.numberOfLocals(), nullptr);
</span><span class="cx"> Operands<Node*> initialAccessNodes(block->variablesAtTail.numberOfArguments(), block->variablesAtTail.numberOfLocals(), nullptr);
</span><del>- for (unsigned i = 0; i < block->size(); i++) {
- Node* node = block->at(i);
</del><ins>+ for (auto* node : *block) {
</ins><span class="cx"> if (!node->accessesStack(m_graph))
</span><span class="cx"> continue;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGPutStackSinkingPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGPutStackSinkingPhase.cpp (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGPutStackSinkingPhase.cpp        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/dfg/DFGPutStackSinkingPhase.cpp        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -560,9 +560,7 @@
</span><span class="cx"> // Finally eliminate the sunken PutStacks by turning them into Checks. This keeps whatever
</span><span class="cx"> // type check they were doing.
</span><span class="cx"> for (BasicBlock* block : m_graph.blocksInNaturalOrder()) {
</span><del>- for (unsigned nodeIndex = 0; nodeIndex < block->size(); ++nodeIndex) {
- Node* node = block->at(nodeIndex);
-
</del><ins>+ for (auto* node : *block) {
</ins><span class="cx"> if (!putStacksToSink.contains(node))
</span><span class="cx"> continue;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGSpeculativeJITcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/dfg/DFGSpeculativeJIT.cpp        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -1767,10 +1767,8 @@
</span><span class="cx">
</span><span class="cx"> // Perform the most basic verification that children have been used correctly.
</span><span class="cx"> if (!ASSERT_DISABLED) {
</span><del>- for (unsigned index = 0; index < m_generationInfo.size(); ++index) {
- GenerationInfo& info = m_generationInfo[index];
</del><ins>+ for (auto& info : m_generationInfo)
</ins><span class="cx"> RELEASE_ASSERT(!info.alive());
</span><del>- }
</del><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><span class="lines">@@ -8892,10 +8890,8 @@
</span><span class="cx">
</span><span class="cx"> void SpeculativeJIT::linkBranches()
</span><span class="cx"> {
</span><del>- for (size_t i = 0; i < m_branches.size(); ++i) {
- BranchRecord& branch = m_branches[i];
</del><ins>+ for (auto& branch : m_branches)
</ins><span class="cx"> branch.jump.linkTo(m_jit.blockHeads()[branch.destination->index], &m_jit);
</span><del>- }
</del><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> void SpeculativeJIT::compileStoreBarrier(Node* node)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGStructureRegistrationPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGStructureRegistrationPhase.cpp (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGStructureRegistrationPhase.cpp        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/dfg/DFGStructureRegistrationPhase.cpp        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -71,9 +71,7 @@
</span><span class="cx"> if (!block)
</span><span class="cx"> continue;
</span><span class="cx">
</span><del>- for (unsigned nodeIndex = 0; nodeIndex < block->size(); ++nodeIndex) {
- Node* node = block->at(nodeIndex);
-
</del><ins>+ for (auto* node : *block) {
</ins><span class="cx"> switch (node->op()) {
</span><span class="cx"> case CheckStructure:
</span><span class="cx"> assertAreRegistered(node->structureSet());
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGTypeCheckHoistingPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGTypeCheckHoistingPhase.cpp (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGTypeCheckHoistingPhase.cpp        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/dfg/DFGTypeCheckHoistingPhase.cpp        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -272,8 +272,7 @@
</span><span class="cx"> if (!shouldConsiderForHoisting<StructureTypeCheck>(variable))
</span><span class="cx"> break;
</span><span class="cx"> Node* source = node->child1().node();
</span><del>- for (unsigned subIndexInBlock = 0; subIndexInBlock < block->size(); ++subIndexInBlock) {
- Node* subNode = block->at(subIndexInBlock);
</del><ins>+ for (auto* subNode : *block) {
</ins><span class="cx"> switch (subNode->op()) {
</span><span class="cx"> case CheckStructure: {
</span><span class="cx"> if (subNode->child1() != source)
</span><span class="lines">@@ -305,8 +304,7 @@
</span><span class="cx"> BasicBlock* block = m_graph.block(blockIndex);
</span><span class="cx"> if (!block)
</span><span class="cx"> continue;
</span><del>- for (unsigned indexInBlock = 0; indexInBlock < block->size(); ++indexInBlock) {
- Node* node = block->at(indexInBlock);
</del><ins>+ for (auto* node : *block) {
</ins><span class="cx"> switch (node->op()) {
</span><span class="cx"> case CheckArray: {
</span><span class="cx"> Node* child = node->child1().node();
</span><span class="lines">@@ -364,8 +362,7 @@
</span><span class="cx"> if (!shouldConsiderForHoisting<ArrayTypeCheck>(variable))
</span><span class="cx"> break;
</span><span class="cx"> Node* source = node->child1().node();
</span><del>- for (unsigned subIndexInBlock = 0; subIndexInBlock < block->size(); ++subIndexInBlock) {
- Node* subNode = block->at(subIndexInBlock);
</del><ins>+ for (auto subNode : *block) {
</ins><span class="cx"> switch (subNode->op()) {
</span><span class="cx"> case CheckStructure: {
</span><span class="cx"> if (subNode->child1() != source)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGValidatecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGValidate.cpp (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGValidate.cpp        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/dfg/DFGValidate.cpp        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -638,8 +638,7 @@
</span><span class="cx">
</span><span class="cx"> bool didSeeExitOK = false;
</span><span class="cx">
</span><del>- for (unsigned nodeIndex = 0; nodeIndex < block->size(); ++nodeIndex) {
- Node* node = block->at(nodeIndex);
</del><ins>+ for (auto* node : *block) {
</ins><span class="cx"> didSeeExitOK |= node->origin.exitOK;
</span><span class="cx"> switch (node->op()) {
</span><span class="cx"> case Phi:
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoredfgDFGVirtualRegisterAllocationPhasecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/dfg/DFGVirtualRegisterAllocationPhase.cpp (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/dfg/DFGVirtualRegisterAllocationPhase.cpp        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/dfg/DFGVirtualRegisterAllocationPhase.cpp        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -59,9 +59,7 @@
</span><span class="cx"> // Force usage of highest-numbered virtual registers.
</span><span class="cx"> scoreBoard.sortFree();
</span><span class="cx"> }
</span><del>- for (size_t indexInBlock = 0; indexInBlock < block->size(); ++indexInBlock) {
- Node* node = block->at(indexInBlock);
-
</del><ins>+ for (auto* node : *block) {
</ins><span class="cx"> if (!node->shouldGenerate())
</span><span class="cx"> continue;
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapHeapVerifiercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/HeapVerifier.cpp (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/HeapVerifier.cpp        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/heap/HeapVerifier.cpp        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -127,8 +127,7 @@
</span><span class="cx"> return;
</span><span class="cx">
</span><span class="cx"> size_t liveObjectsFound = 0;
</span><del>- for (size_t i = 0; i < list.liveObjects.size(); i++) {
- LiveObjectData& objData = list.liveObjects[i];
</del><ins>+ for (auto& objData : list.liveObjects) {
</ins><span class="cx"> if (objData.isConfirmedDead)
</span><span class="cx"> continue; // Don't "resurrect" known dead objects.
</span><span class="cx"> if (!knownLiveSet.contains(objData.obj)) {
</span><span class="lines">@@ -145,10 +144,8 @@
</span><span class="cx"> HashSet<JSObject*> knownLiveSet;
</span><span class="cx">
</span><span class="cx"> LiveObjectList& after = currentCycle().after;
</span><del>- for (size_t i = 0; i < after.liveObjects.size(); i++) {
- LiveObjectData& objData = after.liveObjects[i];
</del><ins>+ for (auto& objData : after.liveObjects)
</ins><span class="cx"> knownLiveSet.add(objData.obj);
</span><del>- }
</del><span class="cx">
</span><span class="cx"> trimDeadObjectsFromList(knownLiveSet, currentCycle().before);
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapLiveObjectListcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/LiveObjectList.cpp (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/LiveObjectList.cpp        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/heap/LiveObjectList.cpp        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -30,8 +30,7 @@
</span><span class="cx">
</span><span class="cx"> LiveObjectData* LiveObjectList::findObject(JSObject* obj)
</span><span class="cx"> {
</span><del>- for (size_t i = 0; i < liveObjects.size(); i++) {
- LiveObjectData& data = liveObjects[i];
</del><ins>+ for (auto& data : liveObjects) {
</ins><span class="cx"> if (obj == data.obj)
</span><span class="cx"> return &data;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreheapMarkedAllocatorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/heap/MarkedAllocator.cpp (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/heap/MarkedAllocator.cpp        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/heap/MarkedAllocator.cpp        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -51,8 +51,7 @@
</span><span class="cx"> bool MarkedAllocator::isPagedOut(double deadline)
</span><span class="cx"> {
</span><span class="cx"> unsigned itersSinceLastTimeCheck = 0;
</span><del>- for (size_t index = 0; index < m_blocks.size(); ++index) {
- MarkedBlock::Handle* block = m_blocks[index];
</del><ins>+ for (auto* block : m_blocks) {
</ins><span class="cx"> if (block)
</span><span class="cx"> block->block().updateNeedsDestruction();
</span><span class="cx"> ++itersSinceLastTimeCheck;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreinspectorScriptCallStackcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/inspector/ScriptCallStack.cpp (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/inspector/ScriptCallStack.cpp        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/inspector/ScriptCallStack.cpp        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -75,8 +75,7 @@
</span><span class="cx"> if (!m_frames.size())
</span><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- for (size_t i = 0; i < m_frames.size(); ++i) {
- const ScriptCallFrame& frame = m_frames[i];
</del><ins>+ for (const auto& frame : m_frames) {
</ins><span class="cx"> if (!frame.isNative())
</span><span class="cx"> return &frame;
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCorejitJITcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/jit/JIT.cpp (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/jit/JIT.cpp        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/jit/JIT.cpp        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -693,8 +693,7 @@
</span><span class="cx"> return CompilationFailed;
</span><span class="cx">
</span><span class="cx"> // Translate vPC offsets into addresses in JIT generated code, for switch tables.
</span><del>- for (unsigned i = 0; i < m_switches.size(); ++i) {
- SwitchRecord record = m_switches[i];
</del><ins>+ for (auto& record : m_switches) {
</ins><span class="cx"> unsigned bytecodeOffset = record.bytecodeOffset;
</span><span class="cx">
</span><span class="cx"> if (record.type != SwitchRecord::String) {
</span><span class="lines">@@ -712,10 +711,9 @@
</span><span class="cx">
</span><span class="cx"> record.jumpTable.stringJumpTable->ctiDefault = patchBuffer.locationOf(m_labels[bytecodeOffset + record.defaultOffset]);
</span><span class="cx">
</span><del>- StringJumpTable::StringOffsetTable::iterator end = record.jumpTable.stringJumpTable->offsetTable.end();
- for (StringJumpTable::StringOffsetTable::iterator it = record.jumpTable.stringJumpTable->offsetTable.begin(); it != end; ++it) {
- unsigned offset = it->value.branchOffset;
- it->value.ctiOffset = offset ? patchBuffer.locationOf(m_labels[bytecodeOffset + offset]) : record.jumpTable.stringJumpTable->ctiDefault;
</del><ins>+ for (auto& location : record.jumpTable.stringJumpTable->offsetTable.values()) {
+ unsigned offset = location.branchOffset;
+ location.ctiOffset = offset ? patchBuffer.locationOf(m_labels[bytecodeOffset + offset]) : record.jumpTable.stringJumpTable->ctiDefault;
</ins><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -725,9 +723,9 @@
</span><span class="cx"> handler.nativeCode = patchBuffer.locationOf(m_labels[handler.target]);
</span><span class="cx"> }
</span><span class="cx">
</span><del>- for (Vector<CallRecord>::iterator iter = m_calls.begin(); iter != m_calls.end(); ++iter) {
- if (iter->to)
- patchBuffer.link(iter->from, FunctionPtr(iter->to));
</del><ins>+ for (auto& record : m_calls) {
+ if (record.to)
+ patchBuffer.link(record.from, FunctionPtr(record.to));
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> for (unsigned i = m_getByIds.size(); i--;)
</span><span class="lines">@@ -762,8 +760,7 @@
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="cx">
</span><del>- for (unsigned i = 0; i < m_callCompilationInfo.size(); ++i) {
- CallCompilationInfo& compilationInfo = m_callCompilationInfo[i];
</del><ins>+ for (auto& compilationInfo : m_callCompilationInfo) {
</ins><span class="cx"> CallLinkInfo& info = *compilationInfo.callLinkInfo;
</span><span class="cx"> info.setCallLocations(
</span><span class="cx"> CodeLocationLabel(patchBuffer.locationOfNearCall(compilationInfo.callReturnLocation)),
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserVariableEnvironmentcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/VariableEnvironment.cpp (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/VariableEnvironment.cpp        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/parser/VariableEnvironment.cpp        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -50,8 +50,8 @@
</span><span class="cx">
</span><span class="cx"> m_isEverythingCaptured = true; // For fast queries.
</span><span class="cx"> // We must mark every entry as captured for when we iterate through m_map and entry.isCaptured() is called.
</span><del>- for (auto iter = m_map.begin(), end = m_map.end(); iter != end; ++iter)
- iter->value.setIsCaptured();
</del><ins>+ for (auto& value : m_map.values())
+ value.setIsCaptured();
</ins><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> bool VariableEnvironment::hasCapturedVariables() const
</span><span class="lines">@@ -58,8 +58,8 @@
</span><span class="cx"> {
</span><span class="cx"> if (m_isEverythingCaptured)
</span><span class="cx"> return size() > 0;
</span><del>- for (auto entry : m_map) {
- if (entry.value.isCaptured())
</del><ins>+ for (auto& value : m_map.values()) {
+ if (value.isCaptured())
</ins><span class="cx"> return true;
</span><span class="cx"> }
</span><span class="cx"> return false;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeFunctionHasExecutedCachecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/FunctionHasExecutedCache.cpp (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/FunctionHasExecutedCache.cpp        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/runtime/FunctionHasExecutedCache.cpp        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -38,10 +38,10 @@
</span><span class="cx"> RangeMap& map = m_rangeMap.find(id)->second;
</span><span class="cx"> unsigned distance = UINT_MAX;
</span><span class="cx"> bool hasExecuted = false;
</span><del>- for (auto iter = map.begin(), end = map.end(); iter != end; ++iter) {
- const FunctionRange& range = iter->first;
</del><ins>+ for (auto& pair : map) {
+ const FunctionRange& range = pair.first;
</ins><span class="cx"> if (range.m_start <= offset && offset <= range.m_end && range.m_end - range.m_start < distance) {
</span><del>- hasExecuted = iter->second;
</del><ins>+ hasExecuted = pair.second;
</ins><span class="cx"> distance = range.m_end - range.m_start;
</span><span class="cx"> }
</span><span class="cx"> }
</span><span class="lines">@@ -88,9 +88,9 @@
</span><span class="cx"> return ranges;
</span><span class="cx">
</span><span class="cx"> RangeMap& map = m_rangeMap.find(id)->second;
</span><del>- for (auto iter = map.begin(), end = map.end(); iter != end; ++iter) {
- const FunctionRange& range = iter->first;
- bool hasExecuted = iter->second;
</del><ins>+ for (auto& pair : map) {
+ const FunctionRange& range = pair.first;
+ bool hasExecuted = pair.second;
</ins><span class="cx"> ranges.append(std::tuple<bool, unsigned, unsigned>(hasExecuted, range.m_start, range.m_end));
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSPropertyNameEnumeratorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSPropertyNameEnumerator.cpp (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSPropertyNameEnumerator.cpp        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/runtime/JSPropertyNameEnumerator.cpp        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -91,8 +91,8 @@
</span><span class="cx"> Base::visitChildren(cell, visitor);
</span><span class="cx"> JSPropertyNameEnumerator* thisObject = jsCast<JSPropertyNameEnumerator*>(cell);
</span><span class="cx"> auto locker = holdLock(*thisObject);
</span><del>- for (unsigned i = 0; i < thisObject->m_propertyNames.size(); ++i)
- visitor.append(thisObject->m_propertyNames[i]);
</del><ins>+ for (auto& propertyName : thisObject->m_propertyNames)
+ visitor.append(propertyName);
</ins><span class="cx"> visitor.append(thisObject->m_prototypeChain);
</span><span class="cx"> }
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeTypeProfilercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/TypeProfiler.cpp (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/TypeProfiler.cpp        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/runtime/TypeProfiler.cpp        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -122,8 +122,7 @@
</span><span class="cx"> Vector<TypeLocation*>& bucket = m_bucketMap.find(sourceID)->value;
</span><span class="cx"> TypeLocation* bestMatch = nullptr;
</span><span class="cx"> unsigned distance = UINT_MAX; // Because assignments may be nested, make sure we find the closest enclosing assignment to this character offset.
</span><del>- for (size_t i = 0, size = bucket.size(); i < size; i++) {
- TypeLocation* location = bucket.at(i);
</del><ins>+ for (auto* location : bucket) {
</ins><span class="cx"> // We found the type location that correlates to the convergence of all return statements in a function.
</span><span class="cx"> // This text offset is the offset of the opening brace in a function declaration.
</span><span class="cx"> if (descriptor == TypeProfilerSearchDescriptorFunctionReturn && location->m_globalVariableID == TypeProfilerReturnStatement && location->m_divotForFunctionOffsetIfReturnStatement == divot)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeTypeSetcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/TypeSet.cpp (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/TypeSet.cpp        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/runtime/TypeSet.cpp        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -58,8 +58,7 @@
</span><span class="cx"> // prototype chain, they will be merged into one shape.
</span><span class="cx"> bool found = false;
</span><span class="cx"> String hash = newShape->propertyHash();
</span><del>- for (size_t i = 0; i < m_structureHistory.size(); i++) {
- RefPtr<StructureShape>& seenShape = m_structureHistory.at(i);
</del><ins>+ for (auto& seenShape : m_structureHistory) {
</ins><span class="cx"> if (seenShape->propertyHash() == hash) {
</span><span class="cx"> found = true;
</span><span class="cx"> break;
</span><span class="lines">@@ -114,8 +113,7 @@
</span><span class="cx"> if (m_seenTypes & TypeSymbol)
</span><span class="cx"> seen.appendLiteral("Symbol ");
</span><span class="cx">
</span><del>- for (size_t i = 0; i < m_structureHistory.size(); i++) {
- RefPtr<StructureShape> shape = m_structureHistory.at(i);
</del><ins>+ for (const auto& shape : m_structureHistory) {
</ins><span class="cx"> seen.append(shape->m_constructorName);
</span><span class="cx"> seen.append(' ');
</span><span class="cx"> }
</span><span class="lines">@@ -122,8 +120,8 @@
</span><span class="cx">
</span><span class="cx"> if (m_structureHistory.size())
</span><span class="cx"> seen.appendLiteral("\nStructures:[ ");
</span><del>- for (size_t i = 0; i < m_structureHistory.size(); i++) {
- seen.append(m_structureHistory.at(i)->stringRepresentation());
</del><ins>+ for (const auto& shape : m_structureHistory) {
+ seen.append(shape->stringRepresentation());
</ins><span class="cx"> seen.append(' ');
</span><span class="cx"> }
</span><span class="cx"> if (m_structureHistory.size())
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeVMcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/VM.cpp (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/VM.cpp        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/runtime/VM.cpp        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -699,8 +699,7 @@
</span><span class="cx"> #if ENABLE(DFG_JIT)
</span><span class="cx"> void VM::gatherConservativeRoots(ConservativeRoots& conservativeRoots)
</span><span class="cx"> {
</span><del>- for (size_t i = 0; i < scratchBuffers.size(); i++) {
- ScratchBuffer* scratchBuffer = scratchBuffers[i];
</del><ins>+ for (auto* scratchBuffer : scratchBuffers) {
</ins><span class="cx"> if (scratchBuffer->activeLength()) {
</span><span class="cx"> void* bufferStart = scratchBuffer->dataBuffer();
</span><span class="cx"> conservativeRoots.add(bufferStart, static_cast<void*>(static_cast<char*>(bufferStart) + scratchBuffer->activeLength()));
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeWeakMapDatacpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/WeakMapData.cpp (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/WeakMapData.cpp        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/runtime/WeakMapData.cpp        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -108,11 +108,11 @@
</span><span class="cx"> void WeakMapData::DeadKeyCleaner::visitWeakReferences(SlotVisitor& visitor)
</span><span class="cx"> {
</span><span class="cx"> m_liveKeyCount = 0;
</span><del>- for (auto it = m_target->m_map.begin(), end = m_target->m_map.end(); it != end; ++it) {
- if (!Heap::isMarked(it->key))
</del><ins>+ for (auto& pair : m_target->m_map) {
+ if (!Heap::isMarked(pair.key))
</ins><span class="cx"> continue;
</span><span class="cx"> m_liveKeyCount++;
</span><del>- visitor.append(it->value);
</del><ins>+ visitor.append(pair.value);
</ins><span class="cx"> }
</span><span class="cx"> RELEASE_ASSERT(m_liveKeyCount <= m_target->m_map.size());
</span><span class="cx"> }
</span><span class="lines">@@ -126,19 +126,19 @@
</span><span class="cx"> return;
</span><span class="cx"> Vector<JSObject*> deadEntries;
</span><span class="cx"> deadEntries.reserveCapacity(deadCount);
</span><del>- for (auto it = m_target->m_map.begin(), end = m_target->m_map.end(); it != end; ++it) {
- if (Heap::isMarked(it->key))
</del><ins>+ for (auto& pair : m_target->m_map) {
+ if (Heap::isMarked(pair.key))
</ins><span class="cx"> continue;
</span><del>- deadEntries.uncheckedAppend(it->key);
</del><ins>+ deadEntries.uncheckedAppend(pair.key);
</ins><span class="cx"> }
</span><del>- for (size_t i = 0; i < deadEntries.size(); i++)
- m_target->m_map.remove(deadEntries[i]);
</del><ins>+ for (auto& deadEntry : deadEntries)
+ m_target->m_map.remove(deadEntry);
</ins><span class="cx"> } else {
</span><span class="cx"> MapType newMap;
</span><del>- for (auto it = m_target->m_map.begin(), end = m_target->m_map.end(); it != end; ++it) {
- if (!Heap::isMarked(it->key))
</del><ins>+ for (auto& pair : m_target->m_map) {
+ if (!Heap::isMarked(pair.key))
</ins><span class="cx"> continue;
</span><del>- newMap.add(it->key, it->value);
</del><ins>+ newMap.add(pair.key, pair.value);
</ins><span class="cx"> }
</span><span class="cx"> m_target->m_map.swap(newMap);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoretoolsProfileTreeNodeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/tools/ProfileTreeNode.h (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/tools/ProfileTreeNode.h        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/tools/ProfileTreeNode.h        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -88,9 +88,7 @@
</span><span class="cx"> qsort(entries.begin(), entries.size(), sizeof(MapEntry*), compareEntries);
</span><span class="cx">
</span><span class="cx"> // Iterate over the children in sample-frequency order.
</span><del>- for (size_t e = 0; e < entries.size(); ++e) {
- MapEntry* entry = entries[e];
-
</del><ins>+ for (auto* entry : entries) {
</ins><span class="cx"> // Print the number of samples, the name of this node, and the number of samples that are stack-top
</span><span class="cx"> // in this node (samples directly within this node, excluding samples in children.
</span><span class="cx"> for (unsigned i = 0; i < indent; ++i)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreyarrYarrInterpretercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/yarr/YarrInterpreter.cpp (210022 => 210023)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/yarr/YarrInterpreter.cpp        2016-12-20 17:25:26 UTC (rev 210022)
+++ trunk/Source/JavaScriptCore/yarr/YarrInterpreter.cpp        2016-12-20 18:26:10 UTC (rev 210023)
</span><span class="lines">@@ -1943,9 +1943,7 @@
</span><span class="cx"> currentCountAlreadyChecked += countToCheck;
</span><span class="cx"> }
</span><span class="cx">
</span><del>- for (unsigned i = 0; i < alternative->m_terms.size(); ++i) {
- PatternTerm& term = alternative->m_terms[i];
-
</del><ins>+ for (auto& term : alternative->m_terms) {
</ins><span class="cx"> switch (term.type) {
</span><span class="cx"> case PatternTerm::TypeAssertionBOL:
</span><span class="cx"> assertionBOL(currentCountAlreadyChecked - term.inputPosition);
</span></span></pre>
</div>
</div>
</body>
</html>