OLD | NEW |
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/code-stubs.h" | 5 #include "src/code-stubs.h" |
6 #include "src/compiler/js-graph.h" | 6 #include "src/compiler/js-graph.h" |
7 #include "src/compiler/node-properties.h" | 7 #include "src/compiler/node-properties.h" |
8 #include "src/compiler/typer.h" | 8 #include "src/compiler/typer.h" |
9 | 9 |
10 namespace v8 { | 10 namespace v8 { |
(...skipping 175 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
186 Node* JSGraph::ExternalConstant(Runtime::FunctionId function_id) { | 186 Node* JSGraph::ExternalConstant(Runtime::FunctionId function_id) { |
187 return ExternalConstant(ExternalReference(function_id, isolate())); | 187 return ExternalConstant(ExternalReference(function_id, isolate())); |
188 } | 188 } |
189 | 189 |
190 | 190 |
191 Node* JSGraph::EmptyFrameState() { | 191 Node* JSGraph::EmptyFrameState() { |
192 Node* empty_frame_state = cached_nodes_[kEmptyFrameState]; | 192 Node* empty_frame_state = cached_nodes_[kEmptyFrameState]; |
193 if (!empty_frame_state || empty_frame_state->IsDead()) { | 193 if (!empty_frame_state || empty_frame_state->IsDead()) { |
194 Node* state_values = graph()->NewNode(common()->StateValues(0)); | 194 Node* state_values = graph()->NewNode(common()->StateValues(0)); |
195 empty_frame_state = graph()->NewNode( | 195 empty_frame_state = graph()->NewNode( |
196 common()->FrameState(JS_FRAME, BailoutId::None(), | 196 common()->FrameState(BailoutId::None(), |
197 OutputFrameStateCombine::Ignore()), | 197 OutputFrameStateCombine::Ignore(), nullptr), |
198 state_values, state_values, state_values, NoContextConstant(), | 198 state_values, state_values, state_values, NoContextConstant(), |
199 UndefinedConstant(), graph()->start()); | 199 UndefinedConstant(), graph()->start()); |
200 cached_nodes_[kEmptyFrameState] = empty_frame_state; | 200 cached_nodes_[kEmptyFrameState] = empty_frame_state; |
201 } | 201 } |
202 return empty_frame_state; | 202 return empty_frame_state; |
203 } | 203 } |
204 | 204 |
205 | 205 |
206 Node* JSGraph::Dead() { | 206 Node* JSGraph::Dead() { |
207 return CACHED(kDead, graph()->NewNode(common()->Dead())); | 207 return CACHED(kDead, graph()->NewNode(common()->Dead())); |
208 } | 208 } |
209 | 209 |
210 | 210 |
211 void JSGraph::GetCachedNodes(NodeVector* nodes) { | 211 void JSGraph::GetCachedNodes(NodeVector* nodes) { |
212 cache_.GetCachedNodes(nodes); | 212 cache_.GetCachedNodes(nodes); |
213 for (size_t i = 0; i < arraysize(cached_nodes_); i++) { | 213 for (size_t i = 0; i < arraysize(cached_nodes_); i++) { |
214 if (Node* node = cached_nodes_[i]) { | 214 if (Node* node = cached_nodes_[i]) { |
215 if (!node->IsDead()) nodes->push_back(node); | 215 if (!node->IsDead()) nodes->push_back(node); |
216 } | 216 } |
217 } | 217 } |
218 } | 218 } |
219 | 219 |
220 } // namespace compiler | 220 } // namespace compiler |
221 } // namespace internal | 221 } // namespace internal |
222 } // namespace v8 | 222 } // namespace v8 |
OLD | NEW |