Changeset 225362 in webkit for trunk/Source/JavaScriptCore/dfg/DFGObjectAllocationSinkingPhase.cpp
- Timestamp:
- Nov 30, 2017, 3:44:24 PM (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/dfg/DFGObjectAllocationSinkingPhase.cpp
r221954 r225362 508 508 void pruneByLiveness(const NodeSet& live) 509 509 { 510 Vector<Node*> toRemove; 511 for (const auto& entry : m_pointers) { 512 if (!live.contains(entry.key)) 513 toRemove.append(entry.key); 514 } 515 for (Node* node : toRemove) 516 m_pointers.remove(node); 517 510 m_pointers.removeIf( 511 [&] (const auto& entry) { 512 return !live.contains(entry.key); 513 }); 518 514 prune(); 519 515 } … … 683 679 684 680 // Remove unreachable allocations 685 { 686 Vector<Node*> toRemove; 687 for (const auto& entry : m_allocations) { 688 if (!reachable.contains(entry.key)) 689 toRemove.append(entry.key); 690 } 691 for (Node* identifier : toRemove) 692 m_allocations.remove(identifier); 693 } 681 m_allocations.removeIf( 682 [&] (const auto& entry) { 683 return !reachable.contains(entry.key); 684 }); 694 685 } 695 686 … … 1250 1241 // We don't create materializations if the escapee is not a 1251 1242 // sink candidate 1252 Vector<Node*> toRemove; 1253 for (const auto& entry : escapees) { 1254 if (!m_sinkCandidates.contains(entry.key)) 1255 toRemove.append(entry.key); 1256 } 1257 for (Node* identifier : toRemove) 1258 escapees.remove(identifier); 1259 1243 escapees.removeIf( 1244 [&] (const auto& entry) { 1245 return !m_sinkCandidates.contains(entry.key); 1246 }); 1260 1247 if (escapees.isEmpty()) 1261 1248 return;
Note:
See TracChangeset
for help on using the changeset viewer.