OLD | NEW |
(Empty) | |
| 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 |
| 3 // found in the LICENSE file. |
| 4 |
| 5 #include "src/compiler/node.h" |
| 6 |
| 7 namespace v8 { |
| 8 namespace internal { |
| 9 namespace compiler { |
| 10 |
| 11 OStream& operator<<(OStream& os, const Operator& op) { return op.PrintTo(os); } |
| 12 |
| 13 |
| 14 OStream& operator<<(OStream& os, const Node& n) { |
| 15 os << n.id() << ": " << *n.op(); |
| 16 if (n.op()->InputCount() != 0) { |
| 17 os << "("; |
| 18 for (int i = 0; i < n.op()->InputCount(); ++i) { |
| 19 if (i != 0) os << ", "; |
| 20 os << n.InputAt(i)->id(); |
| 21 } |
| 22 os << ")"; |
| 23 } |
| 24 return os; |
| 25 } |
| 26 } |
| 27 } |
| 28 } // namespace v8::internal::compiler |
OLD | NEW |