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 #ifndef V8_COMPILER_SCHEDULE_H_ | 5 #ifndef V8_COMPILER_SCHEDULE_H_ |
6 #define V8_COMPILER_SCHEDULE_H_ | 6 #define V8_COMPILER_SCHEDULE_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 #include "src/zone-containers.h" | 10 #include "src/zone-containers.h" |
(...skipping 83 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
94 // Successors. | 94 // Successors. |
95 BasicBlockVector& successors() { return successors_; } | 95 BasicBlockVector& successors() { return successors_; } |
96 const BasicBlockVector& successors() const { return successors_; } | 96 const BasicBlockVector& successors() const { return successors_; } |
97 size_t SuccessorCount() const { return successors_.size(); } | 97 size_t SuccessorCount() const { return successors_.size(); } |
98 BasicBlock* SuccessorAt(size_t index) { return successors_[index]; } | 98 BasicBlock* SuccessorAt(size_t index) { return successors_[index]; } |
99 void ClearSuccessors() { successors_.clear(); } | 99 void ClearSuccessors() { successors_.clear(); } |
100 void AddSuccessor(BasicBlock* successor); | 100 void AddSuccessor(BasicBlock* successor); |
101 | 101 |
102 // Nodes in the basic block. | 102 // Nodes in the basic block. |
103 typedef Node* value_type; | 103 typedef Node* value_type; |
104 typedef value_type& reference; | |
Michael Starzinger
2015/02/17 12:23:35
Do we really need these two typedefs?
Benedikt Meurer
2015/02/17 12:30:38
No, removed them.
| |
105 typedef value_type const& const_reference; | |
104 bool empty() const { return nodes_.empty(); } | 106 bool empty() const { return nodes_.empty(); } |
105 size_t size() const { return nodes_.size(); } | 107 size_t size() const { return nodes_.size(); } |
106 Node* NodeAt(size_t index) { return nodes_[index]; } | 108 Node* NodeAt(size_t index) { return nodes_[index]; } |
107 size_t NodeCount() const { return nodes_.size(); } | 109 size_t NodeCount() const { return nodes_.size(); } |
108 | 110 |
111 reference front() { return nodes_.front(); } | |
112 const_reference front() const { return nodes_.front(); } | |
113 | |
109 typedef NodeVector::iterator iterator; | 114 typedef NodeVector::iterator iterator; |
110 iterator begin() { return nodes_.begin(); } | 115 iterator begin() { return nodes_.begin(); } |
111 iterator end() { return nodes_.end(); } | 116 iterator end() { return nodes_.end(); } |
112 | 117 |
113 typedef NodeVector::const_iterator const_iterator; | 118 typedef NodeVector::const_iterator const_iterator; |
114 const_iterator begin() const { return nodes_.begin(); } | 119 const_iterator begin() const { return nodes_.begin(); } |
115 const_iterator end() const { return nodes_.end(); } | 120 const_iterator end() const { return nodes_.end(); } |
116 | 121 |
117 typedef NodeVector::reverse_iterator reverse_iterator; | 122 typedef NodeVector::reverse_iterator reverse_iterator; |
118 reverse_iterator rbegin() { return nodes_.rbegin(); } | 123 reverse_iterator rbegin() { return nodes_.rbegin(); } |
(...skipping 166 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
285 DISALLOW_COPY_AND_ASSIGN(Schedule); | 290 DISALLOW_COPY_AND_ASSIGN(Schedule); |
286 }; | 291 }; |
287 | 292 |
288 std::ostream& operator<<(std::ostream&, const Schedule&); | 293 std::ostream& operator<<(std::ostream&, const Schedule&); |
289 | 294 |
290 } // namespace compiler | 295 } // namespace compiler |
291 } // namespace internal | 296 } // namespace internal |
292 } // namespace v8 | 297 } // namespace v8 |
293 | 298 |
294 #endif // V8_COMPILER_SCHEDULE_H_ | 299 #endif // V8_COMPILER_SCHEDULE_H_ |
OLD | NEW |