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_GRAPH_H_ | 5 #ifndef V8_COMPILER_GRAPH_H_ |
6 #define V8_COMPILER_GRAPH_H_ | 6 #define V8_COMPILER_GRAPH_H_ |
7 | 7 |
8 #include "src/zone.h" | 8 #include "src/zone.h" |
9 #include "src/zone-containers.h" | 9 #include "src/zone-containers.h" |
10 | 10 |
(...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
80 } | 80 } |
81 Node* NewNode(const Operator* op, Node* n1, Node* n2, Node* n3, Node* n4, | 81 Node* NewNode(const Operator* op, Node* n1, Node* n2, Node* n3, Node* n4, |
82 Node* n5, Node* n6, Node* n7, Node* n8, Node* n9) { | 82 Node* n5, Node* n6, Node* n7, Node* n8, Node* n9) { |
83 Node* nodes[] = {n1, n2, n3, n4, n5, n6, n7, n8, n9}; | 83 Node* nodes[] = {n1, n2, n3, n4, n5, n6, n7, n8, n9}; |
84 return NewNode(op, arraysize(nodes), nodes); | 84 return NewNode(op, arraysize(nodes), nodes); |
85 } | 85 } |
86 | 86 |
87 // Clone the {node}, and assign a new node id to the copy. | 87 // Clone the {node}, and assign a new node id to the copy. |
88 Node* CloneNode(const Node* node); | 88 Node* CloneNode(const Node* node); |
89 | 89 |
90 template <class Visitor> | |
91 inline void VisitNodeInputsFromEnd(Visitor* visitor); | |
92 | |
93 Zone* zone() const { return zone_; } | 90 Zone* zone() const { return zone_; } |
94 Node* start() const { return start_; } | 91 Node* start() const { return start_; } |
95 Node* end() const { return end_; } | 92 Node* end() const { return end_; } |
96 | 93 |
97 void SetStart(Node* start) { start_ = start; } | 94 void SetStart(Node* start) { start_ = start; } |
98 void SetEnd(Node* end) { end_ = end; } | 95 void SetEnd(Node* end) { end_ = end; } |
99 | 96 |
100 size_t NodeCount() const { return next_node_id_; } | 97 size_t NodeCount() const { return next_node_id_; } |
101 | 98 |
102 void Decorate(Node* node); | 99 void Decorate(Node* node); |
(...skipping 22 matching lines...) Expand all Loading... |
125 public: | 122 public: |
126 virtual ~GraphDecorator() {} | 123 virtual ~GraphDecorator() {} |
127 virtual void Decorate(Node* node) = 0; | 124 virtual void Decorate(Node* node) = 0; |
128 }; | 125 }; |
129 | 126 |
130 } // namespace compiler | 127 } // namespace compiler |
131 } // namespace internal | 128 } // namespace internal |
132 } // namespace v8 | 129 } // namespace v8 |
133 | 130 |
134 #endif // V8_COMPILER_GRAPH_H_ | 131 #endif // V8_COMPILER_GRAPH_H_ |
OLD | NEW |