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 #include "src/compiler/generic-node-inl.h" | 7 #include "src/compiler/generic-node-inl.h" |
8 | 8 |
9 namespace v8 { | 9 namespace v8 { |
10 namespace internal { | 10 namespace internal { |
(...skipping 26 matching lines...) Expand all Loading... |
37 OpParameter<size_t>(*i) == projection_index) { | 37 OpParameter<size_t>(*i) == projection_index) { |
38 return *i; | 38 return *i; |
39 } | 39 } |
40 } | 40 } |
41 return NULL; | 41 return NULL; |
42 } | 42 } |
43 | 43 |
44 | 44 |
45 std::ostream& operator<<(std::ostream& os, const Node& n) { | 45 std::ostream& operator<<(std::ostream& os, const Node& n) { |
46 os << n.id() << ": " << *n.op(); | 46 os << n.id() << ": " << *n.op(); |
47 if (n.op()->InputCount() != 0) { | 47 if (n.op()->InputCount() > 0) { |
48 os << "("; | 48 os << "("; |
49 for (int i = 0; i < n.op()->InputCount(); ++i) { | 49 for (int i = 0; i < n.op()->InputCount(); ++i) { |
50 if (i != 0) os << ", "; | 50 if (i != 0) os << ", "; |
51 os << n.InputAt(i)->id(); | 51 os << n.InputAt(i)->id(); |
52 } | 52 } |
53 os << ")"; | 53 os << ")"; |
54 } | 54 } |
55 return os; | 55 return os; |
56 } | 56 } |
57 | 57 |
58 } // namespace compiler | 58 } // namespace compiler |
59 } // namespace internal | 59 } // namespace internal |
60 } // namespace v8 | 60 } // namespace v8 |
OLD | NEW |