Lines Matching defs:GenericNode
20 // A GenericNode<> is the basic primitive of graphs. GenericNode's are
24 // Specializations of the templatized GenericNode<> class must provide a base
26 // specialized Node instance. GenericNode uses a mixin template pattern to
28 // rather than the GenericNode<B, S> type.
30 class GenericNode : public B {
41 inline void ReplaceInput(int index, GenericNode* new_input);
42 inline void AppendInput(Zone* zone, GenericNode* new_input);
43 inline void InsertInput(Zone* zone, int index, GenericNode* new_input);
55 inline void ReplaceUses(GenericNode* replace_to);
57 inline void ReplaceUsesIf(UnaryPredicate pred, GenericNode* replace_to);
68 explicit Inputs(GenericNode* node) : node_(node) {}
71 GenericNode* node_;
83 explicit Uses(GenericNode* node) : node_(node) {}
86 GenericNode* node_;
93 bool OwnedBy(GenericNode* owner) const;
102 GenericNode* from;
110 GenericNode* to;
113 void Update(GenericNode* new_to);
131 GenericNode(GenericGraphBase* graph, int input_count);
153 DISALLOW_COPY_AND_ASSIGN(GenericNode);
160 class GenericNode<B, S>::Edge {
171 friend class GenericNode<B, S>::Uses::iterator;
172 friend class GenericNode<B, S>::Inputs::iterator;
174 explicit Edge(typename GenericNode<B, S>::Input* input) : input_(input) {}
176 typename GenericNode<B, S>::Input* input_;
182 class GenericNode<B, S>::Inputs::iterator {
184 iterator(const typename GenericNode<B, S>::Inputs::iterator& other) // NOLINT
189 typename GenericNode<B, S>::Edge edge() {
190 return typename GenericNode::Edge(GetInput());
202 iterator& UpdateToAndIncrement(GenericNode<B, S>* new_to) {
203 typename GenericNode<B, S>::Input* input = GetInput();
211 friend class GenericNode;
213 explicit iterator(GenericNode* node, int index)
218 GenericNode* node_;
225 class GenericNode<B, S>::Uses::iterator {
227 iterator(const typename GenericNode<B, S>::Uses::iterator& other) // NOLINT
232 typename GenericNode<B, S>::Edge edge() {
233 return typename GenericNode::Edge(CurrentInput());
244 iterator& UpdateToAndIncrement(GenericNode<B, S>* new_to) {
247 typename GenericNode<B, S>::Input* input = CurrentInput();
255 friend class GenericNode<B, S>::Uses;
258 explicit iterator(GenericNode<B, S>* node)
265 typename GenericNode<B, S>::Use* current_;