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

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

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/gap-resolver.h ('k') | src/compiler/graph-reducer.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 #ifndef V8_COMPILER_GRAPH_REDUCER_H_ 5 #ifndef V8_COMPILER_GRAPH_REDUCER_H_
6 #define V8_COMPILER_GRAPH_REDUCER_H_ 6 #define V8_COMPILER_GRAPH_REDUCER_H_
7 7
8 #include "src/zone-containers.h" 8 #include "src/zone-containers.h"
9 9
10 namespace v8 { 10 namespace v8 {
11 namespace internal { 11 namespace internal {
12 namespace compiler { 12 namespace compiler {
13 13
14 // Forward declarations. 14 // Forward declarations.
15 class Graph; 15 class Graph;
16 class Node; 16 class Node;
17 17
18 18
19 // Represents the result of trying to reduce a node in the graph. 19 // Represents the result of trying to reduce a node in the graph.
20 class Reduction V8_FINAL { 20 class Reduction FINAL {
21 public: 21 public:
22 explicit Reduction(Node* replacement = NULL) : replacement_(replacement) {} 22 explicit Reduction(Node* replacement = NULL) : replacement_(replacement) {}
23 23
24 Node* replacement() const { return replacement_; } 24 Node* replacement() const { return replacement_; }
25 bool Changed() const { return replacement() != NULL; } 25 bool Changed() const { return replacement() != NULL; }
26 26
27 private: 27 private:
28 Node* replacement_; 28 Node* replacement_;
29 }; 29 };
30 30
(...skipping 15 matching lines...) Expand all
46 static Reduction NoChange() { return Reduction(); } 46 static Reduction NoChange() { return Reduction(); }
47 static Reduction Replace(Node* node) { return Reduction(node); } 47 static Reduction Replace(Node* node) { return Reduction(node); }
48 static Reduction Changed(Node* node) { return Reduction(node); } 48 static Reduction Changed(Node* node) { return Reduction(node); }
49 49
50 private: 50 private:
51 DISALLOW_COPY_AND_ASSIGN(Reducer); 51 DISALLOW_COPY_AND_ASSIGN(Reducer);
52 }; 52 };
53 53
54 54
55 // Performs an iterative reduction of a node graph. 55 // Performs an iterative reduction of a node graph.
56 class GraphReducer V8_FINAL { 56 class GraphReducer FINAL {
57 public: 57 public:
58 explicit GraphReducer(Graph* graph); 58 explicit GraphReducer(Graph* graph);
59 59
60 Graph* graph() const { return graph_; } 60 Graph* graph() const { return graph_; }
61 61
62 void AddReducer(Reducer* reducer) { reducers_.push_back(reducer); } 62 void AddReducer(Reducer* reducer) { reducers_.push_back(reducer); }
63 63
64 // Reduce a single node. 64 // Reduce a single node.
65 void ReduceNode(Node* node); 65 void ReduceNode(Node* node);
66 // Reduce the whole graph. 66 // Reduce the whole graph.
67 void ReduceGraph(); 67 void ReduceGraph();
68 68
69 private: 69 private:
70 Graph* graph_; 70 Graph* graph_;
71 ZoneVector<Reducer*> reducers_; 71 ZoneVector<Reducer*> reducers_;
72 72
73 DISALLOW_COPY_AND_ASSIGN(GraphReducer); 73 DISALLOW_COPY_AND_ASSIGN(GraphReducer);
74 }; 74 };
75 75
76 } // namespace compiler 76 } // namespace compiler
77 } // namespace internal 77 } // namespace internal
78 } // namespace v8 78 } // namespace v8
79 79
80 #endif // V8_COMPILER_GRAPH_REDUCER_H_ 80 #endif // V8_COMPILER_GRAPH_REDUCER_H_
OLDNEW
« no previous file with comments | « src/compiler/gap-resolver.h ('k') | src/compiler/graph-reducer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698