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

Side by Side Diff: src/compiler/graph-reducer.cc

Issue 526223002: Use Chrome compatible naming for compiler specifics. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: mips Created 6 years, 3 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/compiler/graph-reducer.h ('k') | src/compiler/graph-unittest.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2014 the V8 project authors. All rights reserved. 1 // Copyright 2014 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/graph-reducer.h" 5 #include "src/compiler/graph-reducer.h"
6 6
7 #include <functional> 7 #include <functional>
8 8
9 #include "src/compiler/graph-inl.h" 9 #include "src/compiler/graph-inl.h"
10 10
(...skipping 54 matching lines...) Expand 10 before | Expand all | Expand 10 after
65 node = replacement; 65 node = replacement;
66 reduce = true; 66 reduce = true;
67 break; 67 break;
68 } 68 }
69 } 69 }
70 } 70 }
71 } 71 }
72 72
73 73
74 // A helper class to reuse the node traversal algorithm. 74 // A helper class to reuse the node traversal algorithm.
75 struct GraphReducerVisitor V8_FINAL : public NullNodeVisitor { 75 struct GraphReducerVisitor FINAL : public NullNodeVisitor {
76 explicit GraphReducerVisitor(GraphReducer* reducer) : reducer_(reducer) {} 76 explicit GraphReducerVisitor(GraphReducer* reducer) : reducer_(reducer) {}
77 GenericGraphVisit::Control Post(Node* node) { 77 GenericGraphVisit::Control Post(Node* node) {
78 reducer_->ReduceNode(node); 78 reducer_->ReduceNode(node);
79 return GenericGraphVisit::CONTINUE; 79 return GenericGraphVisit::CONTINUE;
80 } 80 }
81 GraphReducer* reducer_; 81 GraphReducer* reducer_;
82 }; 82 };
83 83
84 84
85 void GraphReducer::ReduceGraph() { 85 void GraphReducer::ReduceGraph() {
86 GraphReducerVisitor visitor(this); 86 GraphReducerVisitor visitor(this);
87 // Perform a post-order reduction of all nodes starting from the end. 87 // Perform a post-order reduction of all nodes starting from the end.
88 graph()->VisitNodeInputsFromEnd(&visitor); 88 graph()->VisitNodeInputsFromEnd(&visitor);
89 } 89 }
90 90
91 91
92 // TODO(titzer): partial graph reductions. 92 // TODO(titzer): partial graph reductions.
93 } 93 }
94 } 94 }
95 } // namespace v8::internal::compiler 95 } // namespace v8::internal::compiler
OLDNEW
« no previous file with comments | « src/compiler/graph-reducer.h ('k') | src/compiler/graph-unittest.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698