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/node.h" | 5 #include "src/compiler/node.h" |
6 | 6 |
7 namespace v8 { | 7 namespace v8 { |
8 namespace internal { | 8 namespace internal { |
9 namespace compiler { | 9 namespace compiler { |
10 | 10 |
(...skipping 253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
264 } else if (from == owner2) { | 264 } else if (from == owner2) { |
265 mask |= 2; | 265 mask |= 2; |
266 } else { | 266 } else { |
267 return false; | 267 return false; |
268 } | 268 } |
269 } | 269 } |
270 return mask == 3; | 270 return mask == 3; |
271 } | 271 } |
272 | 272 |
273 | 273 |
| 274 void Node::Print() const { |
| 275 OFStream os(stdout); |
| 276 os << *this << std::endl; |
| 277 } |
| 278 |
| 279 |
274 Node::Node(NodeId id, const Operator* op, int inline_count, int inline_capacity) | 280 Node::Node(NodeId id, const Operator* op, int inline_count, int inline_capacity) |
275 : op_(op), | 281 : op_(op), |
276 type_(nullptr), | 282 type_(nullptr), |
277 mark_(0), | 283 mark_(0), |
278 bit_field_(IdField::encode(id) | InlineCountField::encode(inline_count) | | 284 bit_field_(IdField::encode(id) | InlineCountField::encode(inline_count) | |
279 InlineCapacityField::encode(inline_capacity)), | 285 InlineCapacityField::encode(inline_capacity)), |
280 first_use_(nullptr) { | 286 first_use_(nullptr) { |
281 // Inputs must either be out of line or within the inline capacity. | 287 // Inputs must either be out of line or within the inline capacity. |
282 DCHECK(inline_capacity <= kMaxInlineCapacity); | 288 DCHECK(inline_capacity <= kMaxInlineCapacity); |
283 DCHECK(inline_count == kOutlineMarker || inline_count <= inline_capacity); | 289 DCHECK(inline_count == kOutlineMarker || inline_count <= inline_capacity); |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
396 ++(*this); | 402 ++(*this); |
397 return result; | 403 return result; |
398 } | 404 } |
399 | 405 |
400 | 406 |
401 bool Node::Uses::empty() const { return begin() == end(); } | 407 bool Node::Uses::empty() const { return begin() == end(); } |
402 | 408 |
403 } // namespace compiler | 409 } // namespace compiler |
404 } // namespace internal | 410 } // namespace internal |
405 } // namespace v8 | 411 } // namespace v8 |
OLD | NEW |