| 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/compiler/js-graph.h" | 5 #include "src/compiler/js-graph.h" |
| 6 | 6 |
| 7 #include "src/code-stubs.h" | 7 #include "src/code-stubs.h" |
| 8 #include "src/compiler/node-properties.h" | 8 #include "src/compiler/node-properties.h" |
| 9 #include "src/compiler/typer.h" | 9 #include "src/compiler/typer.h" |
| 10 #include "src/objects-inl.h" | 10 #include "src/objects-inl.h" |
| (...skipping 262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 273 | 273 |
| 274 Node* JSGraph::ExternalConstant(Runtime::FunctionId function_id) { | 274 Node* JSGraph::ExternalConstant(Runtime::FunctionId function_id) { |
| 275 return ExternalConstant(ExternalReference(function_id, isolate())); | 275 return ExternalConstant(ExternalReference(function_id, isolate())); |
| 276 } | 276 } |
| 277 | 277 |
| 278 Node* JSGraph::EmptyStateValues() { | 278 Node* JSGraph::EmptyStateValues() { |
| 279 return CACHED(kEmptyStateValues, graph()->NewNode(common()->StateValues( | 279 return CACHED(kEmptyStateValues, graph()->NewNode(common()->StateValues( |
| 280 0, SparseInputMask::Dense()))); | 280 0, SparseInputMask::Dense()))); |
| 281 } | 281 } |
| 282 | 282 |
| 283 Node* JSGraph::SingleDeadTypedStateValues() { |
| 284 return CACHED(kSingleDeadTypedStateValues, |
| 285 graph()->NewNode(common()->TypedStateValues( |
| 286 new (graph()->zone()->New(sizeof(ZoneVector<MachineType>))) |
| 287 ZoneVector<MachineType>(0, graph()->zone()), |
| 288 SparseInputMask(SparseInputMask::kEndMarker << 1)))); |
| 289 } |
| 290 |
| 283 Node* JSGraph::Dead() { | 291 Node* JSGraph::Dead() { |
| 284 return CACHED(kDead, graph()->NewNode(common()->Dead())); | 292 return CACHED(kDead, graph()->NewNode(common()->Dead())); |
| 285 } | 293 } |
| 286 | 294 |
| 287 | 295 |
| 288 void JSGraph::GetCachedNodes(NodeVector* nodes) { | 296 void JSGraph::GetCachedNodes(NodeVector* nodes) { |
| 289 cache_.GetCachedNodes(nodes); | 297 cache_.GetCachedNodes(nodes); |
| 290 for (size_t i = 0; i < arraysize(cached_nodes_); i++) { | 298 for (size_t i = 0; i < arraysize(cached_nodes_); i++) { |
| 291 if (Node* node = cached_nodes_[i]) { | 299 if (Node* node = cached_nodes_[i]) { |
| 292 if (!node->IsDead()) nodes->push_back(node); | 300 if (!node->IsDead()) nodes->push_back(node); |
| 293 } | 301 } |
| 294 } | 302 } |
| 295 } | 303 } |
| 296 | 304 |
| 297 } // namespace compiler | 305 } // namespace compiler |
| 298 } // namespace internal | 306 } // namespace internal |
| 299 } // namespace v8 | 307 } // namespace v8 |
| OLD | NEW |