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 351 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
362 } | 362 } |
363 #endif | 363 #endif |
364 | 364 |
365 | 365 |
366 std::ostream& operator<<(std::ostream& os, const Node& n) { | 366 std::ostream& operator<<(std::ostream& os, const Node& n) { |
367 os << n.id() << ": " << *n.op(); | 367 os << n.id() << ": " << *n.op(); |
368 if (n.InputCount() > 0) { | 368 if (n.InputCount() > 0) { |
369 os << "("; | 369 os << "("; |
370 for (int i = 0; i < n.InputCount(); ++i) { | 370 for (int i = 0; i < n.InputCount(); ++i) { |
371 if (i != 0) os << ", "; | 371 if (i != 0) os << ", "; |
372 os << n.InputAt(i)->id(); | 372 if (n.InputAt(i)) { |
| 373 os << n.InputAt(i)->id(); |
| 374 } else { |
| 375 os << "null"; |
| 376 } |
373 } | 377 } |
374 os << ")"; | 378 os << ")"; |
375 } | 379 } |
376 return os; | 380 return os; |
377 } | 381 } |
378 | 382 |
379 | 383 |
380 Node::InputEdges::iterator Node::InputEdges::iterator::operator++(int n) { | 384 Node::InputEdges::iterator Node::InputEdges::iterator::operator++(int n) { |
381 iterator result(*this); | 385 iterator result(*this); |
382 ++(*this); | 386 ++(*this); |
(...skipping 29 matching lines...) Expand all Loading... |
412 ++(*this); | 416 ++(*this); |
413 return result; | 417 return result; |
414 } | 418 } |
415 | 419 |
416 | 420 |
417 bool Node::Uses::empty() const { return begin() == end(); } | 421 bool Node::Uses::empty() const { return begin() == end(); } |
418 | 422 |
419 } // namespace compiler | 423 } // namespace compiler |
420 } // namespace internal | 424 } // namespace internal |
421 } // namespace v8 | 425 } // namespace v8 |
OLD | NEW |