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/node.h

Issue 767733002: De-generify the GenericGraph. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Rebased again. Created 6 years 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
« no previous file with comments | « src/compiler/graph-builder.cc ('k') | tools/gyp/v8.gyp » ('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 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 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_NODE_H_ 5 #ifndef V8_COMPILER_NODE_H_
6 #define V8_COMPILER_NODE_H_ 6 #define V8_COMPILER_NODE_H_
7 7
8 #include <deque> 8 #include <deque>
9 #include <set> 9 #include <set>
10 #include <vector> 10 #include <vector>
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
54 void set_mark(Mark mark) { mark_ = mark; } 54 void set_mark(Mark mark) { mark_ = mark; }
55 }; 55 };
56 56
57 // A Node is the basic primitive of an IR graph. In addition to the members 57 // A Node is the basic primitive of an IR graph. In addition to the members
58 // inherited from Vector, Nodes only contain a mutable Operator that may change 58 // inherited from Vector, Nodes only contain a mutable Operator that may change
59 // during compilation, e.g. during lowering passes. Other information that 59 // during compilation, e.g. during lowering passes. Other information that
60 // needs to be associated with Nodes during compilation must be stored 60 // needs to be associated with Nodes during compilation must be stored
61 // out-of-line indexed by the Node's id. 61 // out-of-line indexed by the Node's id.
62 class Node FINAL : public GenericNode<NodeData, Node> { 62 class Node FINAL : public GenericNode<NodeData, Node> {
63 public: 63 public:
64 Node(GenericGraphBase* graph, int input_count, int reserve_input_count) 64 Node(Graph* graph, int input_count, int reserve_input_count)
65 : GenericNode<NodeData, Node>(graph, input_count, reserve_input_count) {} 65 : GenericNode<NodeData, Node>(graph, input_count, reserve_input_count) {}
66 66
67 void Initialize(const Operator* op) { 67 void Initialize(const Operator* op) {
68 set_op(op); 68 set_op(op);
69 set_mark(0); 69 set_mark(0);
70 } 70 }
71 71
72 bool IsDead() const { return InputCount() > 0 && InputAt(0) == NULL; } 72 bool IsDead() const { return InputCount() > 0 && InputAt(0) == NULL; }
73 void Kill(); 73 void Kill();
74 74
(...skipping 27 matching lines...) Expand all
102 template <typename T> 102 template <typename T>
103 static inline const T& OpParameter(const Node* node) { 103 static inline const T& OpParameter(const Node* node) {
104 return OpParameter<T>(node->op()); 104 return OpParameter<T>(node->op());
105 } 105 }
106 106
107 } // namespace compiler 107 } // namespace compiler
108 } // namespace internal 108 } // namespace internal
109 } // namespace v8 109 } // namespace v8
110 110
111 #endif // V8_COMPILER_NODE_H_ 111 #endif // V8_COMPILER_NODE_H_
OLDNEW
« no previous file with comments | « src/compiler/graph-builder.cc ('k') | tools/gyp/v8.gyp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698