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

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

Issue 929123002: Move DeadControl into the JSGraph so that it can be reused. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 10 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
« no previous file with comments | « src/compiler/control-reducer.cc ('k') | src/compiler/js-graph.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_JS_GRAPH_H_ 5 #ifndef V8_COMPILER_JS_GRAPH_H_
6 #define V8_COMPILER_JS_GRAPH_H_ 6 #define V8_COMPILER_JS_GRAPH_H_
7 7
8 #include "src/compiler/common-node-cache.h" 8 #include "src/compiler/common-node-cache.h"
9 #include "src/compiler/common-operator.h" 9 #include "src/compiler/common-operator.h"
10 #include "src/compiler/graph.h" 10 #include "src/compiler/graph.h"
(...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after
107 } 107 }
108 108
109 // Creates a dummy Constant node, used to satisfy calling conventions of 109 // Creates a dummy Constant node, used to satisfy calling conventions of
110 // stubs and runtime functions that do not require a context. 110 // stubs and runtime functions that do not require a context.
111 Node* NoContextConstant() { return ZeroConstant(); } 111 Node* NoContextConstant() { return ZeroConstant(); }
112 112
113 // Creates an empty frame states for cases where we know that a function 113 // Creates an empty frame states for cases where we know that a function
114 // cannot deopt. 114 // cannot deopt.
115 Node* EmptyFrameState(); 115 Node* EmptyFrameState();
116 116
117 // Create a control node that serves as control dependency for dead nodes.
118 Node* DeadControl();
119
117 JSOperatorBuilder* javascript() const { return javascript_; } 120 JSOperatorBuilder* javascript() const { return javascript_; }
118 CommonOperatorBuilder* common() const { return common_; } 121 CommonOperatorBuilder* common() const { return common_; }
119 MachineOperatorBuilder* machine() const { return machine_; } 122 MachineOperatorBuilder* machine() const { return machine_; }
120 Graph* graph() const { return graph_; } 123 Graph* graph() const { return graph_; }
121 Zone* zone() const { return graph()->zone(); } 124 Zone* zone() const { return graph()->zone(); }
122 Isolate* isolate() const { return isolate_; } 125 Isolate* isolate() const { return isolate_; }
123 Factory* factory() const { return isolate()->factory(); } 126 Factory* factory() const { return isolate()->factory(); }
124 127
125 void GetCachedNodes(NodeVector* nodes); 128 void GetCachedNodes(NodeVector* nodes);
126 129
127 private: 130 private:
128 Isolate* isolate_; 131 Isolate* isolate_;
129 Graph* graph_; 132 Graph* graph_;
130 CommonOperatorBuilder* common_; 133 CommonOperatorBuilder* common_;
131 JSOperatorBuilder* javascript_; 134 JSOperatorBuilder* javascript_;
132 MachineOperatorBuilder* machine_; 135 MachineOperatorBuilder* machine_;
133 136
134 // TODO(titzer): make this into a simple array. 137 // TODO(titzer): make this into a simple array.
135 SetOncePointer<Node> c_entry_stub_constant_; 138 SetOncePointer<Node> c_entry_stub_constant_;
136 SetOncePointer<Node> undefined_constant_; 139 SetOncePointer<Node> undefined_constant_;
137 SetOncePointer<Node> the_hole_constant_; 140 SetOncePointer<Node> the_hole_constant_;
138 SetOncePointer<Node> true_constant_; 141 SetOncePointer<Node> true_constant_;
139 SetOncePointer<Node> false_constant_; 142 SetOncePointer<Node> false_constant_;
140 SetOncePointer<Node> null_constant_; 143 SetOncePointer<Node> null_constant_;
141 SetOncePointer<Node> zero_constant_; 144 SetOncePointer<Node> zero_constant_;
142 SetOncePointer<Node> one_constant_; 145 SetOncePointer<Node> one_constant_;
143 SetOncePointer<Node> nan_constant_; 146 SetOncePointer<Node> nan_constant_;
144 SetOncePointer<Node> empty_frame_state_; 147 SetOncePointer<Node> empty_frame_state_;
148 SetOncePointer<Node> dead_control_;
145 149
146 CommonNodeCache cache_; 150 CommonNodeCache cache_;
147 151
148 Node* ImmovableHeapConstant(Handle<HeapObject> value); 152 Node* ImmovableHeapConstant(Handle<HeapObject> value);
149 Node* NumberConstant(double value); 153 Node* NumberConstant(double value);
150 154
151 DISALLOW_COPY_AND_ASSIGN(JSGraph); 155 DISALLOW_COPY_AND_ASSIGN(JSGraph);
152 }; 156 };
153 157
154 } // namespace compiler 158 } // namespace compiler
155 } // namespace internal 159 } // namespace internal
156 } // namespace v8 160 } // namespace v8
157 161
158 #endif 162 #endif
OLDNEW
« no previous file with comments | « src/compiler/control-reducer.cc ('k') | src/compiler/js-graph.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698