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_NODE_H_ | 5 #ifndef V8_COMPILER_NODE_H_ |
6 #define V8_COMPILER_NODE_H_ | 6 #define V8_COMPILER_NODE_H_ |
7 | 7 |
8 #include "src/compiler/opcodes.h" | 8 #include "src/compiler/opcodes.h" |
9 #include "src/compiler/operator.h" | 9 #include "src/compiler/operator.h" |
10 #include "src/types.h" | 10 #include "src/types.h" |
(...skipping 168 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
179 | 179 |
180 Uses uses() { return Uses(this); } | 180 Uses uses() { return Uses(this); } |
181 | 181 |
182 // Returns true if {owner} is the user of {this} node. | 182 // Returns true if {owner} is the user of {this} node. |
183 bool OwnedBy(Node* owner) const { | 183 bool OwnedBy(Node* owner) const { |
184 return first_use_ && first_use_->from() == owner && !first_use_->next; | 184 return first_use_ && first_use_->from() == owner && !first_use_->next; |
185 } | 185 } |
186 | 186 |
187 // Returns true if {owner1} and {owner2} are the only users of {this} node. | 187 // Returns true if {owner1} and {owner2} are the only users of {this} node. |
188 bool OwnedBy(Node const* owner1, Node const* owner2) const; | 188 bool OwnedBy(Node const* owner1, Node const* owner2) const; |
| 189 void Print() const; |
189 | 190 |
190 private: | 191 private: |
191 struct Use; | 192 struct Use; |
192 // Out of line storage for inputs when the number of inputs overflowed the | 193 // Out of line storage for inputs when the number of inputs overflowed the |
193 // capacity of the inline-allocated space. | 194 // capacity of the inline-allocated space. |
194 struct OutOfLineInputs { | 195 struct OutOfLineInputs { |
195 Node* node_; | 196 Node* node_; |
196 int count_; | 197 int count_; |
197 int capacity_; | 198 int capacity_; |
198 Node* inputs_[1]; | 199 Node* inputs_[1]; |
(...skipping 355 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
554 } | 555 } |
555 | 556 |
556 | 557 |
557 Node::Uses::const_iterator Node::Uses::end() const { return const_iterator(); } | 558 Node::Uses::const_iterator Node::Uses::end() const { return const_iterator(); } |
558 | 559 |
559 } // namespace compiler | 560 } // namespace compiler |
560 } // namespace internal | 561 } // namespace internal |
561 } // namespace v8 | 562 } // namespace v8 |
562 | 563 |
563 #endif // V8_COMPILER_NODE_H_ | 564 #endif // V8_COMPILER_NODE_H_ |
OLD | NEW |