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

Unified Diff: src/compiler/graph-reducer.cc

Issue 505133003: Introduce subclass wrappers for STL containers that make them a lot easier (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 | « src/compiler/graph-reducer.h ('k') | src/compiler/instruction.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/graph-reducer.cc
diff --git a/src/compiler/graph-reducer.cc b/src/compiler/graph-reducer.cc
index f062d4bea9af58f342f06ab5e4bd18dcdc45d204..2a60b49d91d4c6fcc82e64cb8a009f0b2b6f3c32 100644
--- a/src/compiler/graph-reducer.cc
+++ b/src/compiler/graph-reducer.cc
@@ -13,7 +13,7 @@ namespace internal {
namespace compiler {
GraphReducer::GraphReducer(Graph* graph)
- : graph_(graph), reducers_(Reducers::allocator_type(graph->zone())) {}
+ : graph_(graph), reducers_(graph->zone()) {}
static bool NodeIdIsLessThan(const Node* node, NodeId id) {
@@ -22,14 +22,15 @@ static bool NodeIdIsLessThan(const Node* node, NodeId id) {
void GraphReducer::ReduceNode(Node* node) {
- Reducers::iterator skip = reducers_.end();
+ ZoneVector<Reducer*>::iterator skip = reducers_.end();
static const unsigned kMaxAttempts = 16;
bool reduce = true;
for (unsigned attempts = 0; attempts <= kMaxAttempts; ++attempts) {
if (!reduce) return;
reduce = false; // Assume we don't need to rerun any reducers.
int before = graph_->NodeCount();
- for (Reducers::iterator i = reducers_.begin(); i != reducers_.end(); ++i) {
+ for (ZoneVector<Reducer*>::iterator i = reducers_.begin();
+ i != reducers_.end(); ++i) {
if (i == skip) continue; // Skip this reducer.
Reduction reduction = (*i)->Reduce(node);
Node* replacement = reduction.replacement();
« no previous file with comments | « src/compiler/graph-reducer.h ('k') | src/compiler/instruction.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698