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

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 comment Created 6 years, 1 month 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
Index: src/compiler/generic-algorithm-inl.h
diff --git a/src/compiler/generic-algorithm-inl.h b/src/compiler/generic-algorithm-inl.h
index 32d42bad813906cb61104710c24865b26b79a86a..d15059d7061a30701d289eae8f3de36c1dbfa6db 100644
--- a/src/compiler/generic-algorithm-inl.h
+++ b/src/compiler/generic-algorithm-inl.h
@@ -20,13 +20,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(GenericGraphBase* 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

Powered by Google App Engine
This is Rietveld 408576698