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

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

Issue 467103003: Allow use of phase-local zone in GenericGraphVisit. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 4 months 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 | « no previous file | src/compiler/graph-inl.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/generic-algorithm.h
diff --git a/src/compiler/generic-algorithm.h b/src/compiler/generic-algorithm.h
index 607d339ae40d9b58e6104a9710acec06f9412c12..c4681f95139447805eb9df5ab1fa64990379e81c 100644
--- a/src/compiler/generic-algorithm.h
+++ b/src/compiler/generic-algorithm.h
@@ -38,10 +38,9 @@ class GenericGraphVisit {
// void PostEdge(Traits::Node* from, int index, Traits::Node* to);
// }
template <class Visitor, class Traits, class RootIterator>
- static void Visit(GenericGraphBase* graph, RootIterator root_begin,
- RootIterator root_end, Visitor* visitor) {
- // TODO(bmeurer): Pass "local" zone as parameter.
- Zone* zone = graph->zone();
+ static void Visit(GenericGraphBase* graph, Zone* zone,
+ RootIterator root_begin, RootIterator root_end,
+ Visitor* visitor) {
typedef typename Traits::Node Node;
typedef typename Traits::Iterator Iterator;
typedef std::pair<Iterator, Iterator> NodeState;
@@ -97,10 +96,10 @@ class GenericGraphVisit {
}
template <class Visitor, class Traits>
- static void Visit(GenericGraphBase* graph, typename Traits::Node* current,
- Visitor* visitor) {
+ static void Visit(GenericGraphBase* graph, Zone* zone,
+ typename Traits::Node* current, Visitor* visitor) {
typename Traits::Node* array[] = {current};
- Visit<Visitor, Traits>(graph, &array[0], &array[1], visitor);
+ Visit<Visitor, Traits>(graph, zone, &array[0], &array[1], visitor);
}
template <class B, class S>
« no previous file with comments | « no previous file | src/compiler/graph-inl.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698