Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(101)

Unified Diff: src/compiler/generic-algorithm-inl.h

Issue 765983002: Clean up node iteration (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Fix windows build Created 6 years ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/generic-algorithm.h ('k') | src/compiler/graph-visualizer.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/generic-algorithm-inl.h
diff --git a/src/compiler/generic-algorithm-inl.h b/src/compiler/generic-algorithm-inl.h
index 02292969d603a00610852848cb71b19b26115802..41280b2bd3e300e61bb7a38374340bafe3b86df7 100644
--- a/src/compiler/generic-algorithm-inl.h
+++ b/src/compiler/generic-algorithm-inl.h
@@ -19,13 +19,13 @@ template <class N>
class NodeInputIterationTraits {
public:
typedef N Node;
- typedef typename N::Inputs::iterator Iterator;
+ typedef typename N::InputEdges::iterator Iterator;
- static Iterator begin(Node* node) { return node->inputs().begin(); }
- static Iterator end(Node* node) { return node->inputs().end(); }
+ static Iterator begin(Node* node) { return node->input_edges().begin(); }
+ static Iterator end(Node* node) { return node->input_edges().end(); }
static int max_id(Graph* graph) { return graph->NodeCount(); }
- static Node* to(Iterator iterator) { return *iterator; }
- static Node* from(Iterator iterator) { return iterator.edge().from(); }
+ static Node* to(Iterator iterator) { return (*iterator).to(); }
+ static Node* from(Iterator iterator) { return (*iterator).from(); }
};
} // namespace compiler
« no previous file with comments | « src/compiler/generic-algorithm.h ('k') | src/compiler/graph-visualizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698