| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #include "src/compiler/scheduler.h" | 5 #include "src/compiler/scheduler.h" |
| 6 | 6 |
| 7 #include <iomanip> | 7 #include <iomanip> |
| 8 | 8 |
| 9 #include "src/base/adapters.h" | 9 #include "src/base/adapters.h" |
| 10 #include "src/bit-vector.h" | 10 #include "src/bit-vector.h" |
| (...skipping 668 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 679 struct LoopInfo { | 679 struct LoopInfo { |
| 680 BasicBlock* header; | 680 BasicBlock* header; |
| 681 ZoneVector<BasicBlock*>* outgoing; | 681 ZoneVector<BasicBlock*>* outgoing; |
| 682 BitVector* members; | 682 BitVector* members; |
| 683 LoopInfo* prev; | 683 LoopInfo* prev; |
| 684 BasicBlock* end; | 684 BasicBlock* end; |
| 685 BasicBlock* start; | 685 BasicBlock* start; |
| 686 | 686 |
| 687 void AddOutgoing(Zone* zone, BasicBlock* block) { | 687 void AddOutgoing(Zone* zone, BasicBlock* block) { |
| 688 if (outgoing == nullptr) { | 688 if (outgoing == nullptr) { |
| 689 outgoing = new (zone->New(sizeof(ZoneVector<BasicBlock*>))) | 689 outgoing = new (zone) ZoneVector<BasicBlock*>(zone); |
| 690 ZoneVector<BasicBlock*>(zone); | |
| 691 } | 690 } |
| 692 outgoing->push_back(block); | 691 outgoing->push_back(block); |
| 693 } | 692 } |
| 694 }; | 693 }; |
| 695 | 694 |
| 696 int Push(ZoneVector<SpecialRPOStackFrame>& stack, int depth, | 695 int Push(ZoneVector<SpecialRPOStackFrame>& stack, int depth, |
| 697 BasicBlock* child, int unvisited) { | 696 BasicBlock* child, int unvisited) { |
| 698 if (child->rpo_number() == unvisited) { | 697 if (child->rpo_number() == unvisited) { |
| 699 stack[depth].block = child; | 698 stack[depth].block = child; |
| 700 stack[depth].index = 0; | 699 stack[depth].index = 0; |
| (...skipping 1044 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1745 for (Node* const node : *nodes) { | 1744 for (Node* const node : *nodes) { |
| 1746 schedule_->SetBlockForNode(to, node); | 1745 schedule_->SetBlockForNode(to, node); |
| 1747 scheduled_nodes_[to->id().ToSize()].push_back(node); | 1746 scheduled_nodes_[to->id().ToSize()].push_back(node); |
| 1748 } | 1747 } |
| 1749 nodes->clear(); | 1748 nodes->clear(); |
| 1750 } | 1749 } |
| 1751 | 1750 |
| 1752 } // namespace compiler | 1751 } // namespace compiler |
| 1753 } // namespace internal | 1752 } // namespace internal |
| 1754 } // namespace v8 | 1753 } // namespace v8 |
| OLD | NEW |