Changeset 178884 in webkit for trunk/Source/JavaScriptCore/heap/Heap.cpp
- Timestamp:
- Jan 21, 2015, 6:56:26 PM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/heap/Heap.cpp
r178364 r178884 903 903 #endif // ENABLE(DFG_JIT) 904 904 905 for (ExecutableBase* current = m_compiledCode.head(); current; current = current->next()) {905 for (ExecutableBase* current : m_compiledCode) { 906 906 if (!current->isFunctionExecutable()) 907 907 continue; … … 916 916 void Heap::deleteAllUnlinkedFunctionCode() 917 917 { 918 for (ExecutableBase* current = m_compiledCode.head(); current; current = current->next()) {918 for (ExecutableBase* current : m_compiledCode) { 919 919 if (!current->isFunctionExecutable()) 920 920 continue; … … 926 926 { 927 927 GCPHASE(ClearUnmarkedExecutables); 928 ExecutableBase* next; 929 for (ExecutableBase* current = m_compiledCode.head(); current; current = next) { 930 next = current->next(); 928 for (unsigned i = m_compiledCode.size(); i--;) { 929 ExecutableBase* current = m_compiledCode[i]; 931 930 if (isMarked(current)) 932 931 continue; … … 935 934 // CodeBlock requires eager finalization. 936 935 ExecutableBase::clearCodeVirtual(current); 937 m_compiledCode.remove(current); 936 std::swap(m_compiledCode[i], m_compiledCode.last()); 937 m_compiledCode.removeLast(); 938 938 } 939 939 }
Note:
See TracChangeset
for help on using the changeset viewer.