| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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/escape-analysis-reducer.h" | 5 #include "src/compiler/escape-analysis-reducer.h" |
| 6 | 6 |
| 7 #include "src/compiler/all-nodes.h" | 7 #include "src/compiler/all-nodes.h" |
| 8 #include "src/compiler/js-graph.h" | 8 #include "src/compiler/js-graph.h" |
| 9 #include "src/counters.h" | 9 #include "src/counters.h" |
| 10 | 10 |
| (...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 261 } else { | 261 } else { |
| 262 if (Node* ret = ReduceStateValueInput(node, i, effect, node_multiused, | 262 if (Node* ret = ReduceStateValueInput(node, i, effect, node_multiused, |
| 263 clone, multiple_users)) { | 263 clone, multiple_users)) { |
| 264 DCHECK_NULL(clone); | 264 DCHECK_NULL(clone); |
| 265 node_multiused = false; // Don't clone anymore. | 265 node_multiused = false; // Don't clone anymore. |
| 266 node = clone = ret; | 266 node = clone = ret; |
| 267 } | 267 } |
| 268 } | 268 } |
| 269 } | 269 } |
| 270 if (node->opcode() == IrOpcode::kFrameState) { | 270 if (node->opcode() == IrOpcode::kFrameState) { |
| 271 Node* outer_frame_state = NodeProperties::GetFrameStateInput(node, 0); | 271 Node* outer_frame_state = NodeProperties::GetFrameStateInput(node); |
| 272 if (outer_frame_state->opcode() == IrOpcode::kFrameState) { | 272 if (outer_frame_state->opcode() == IrOpcode::kFrameState) { |
| 273 if (Node* ret = | 273 if (Node* ret = |
| 274 ReduceDeoptState(outer_frame_state, effect, multiple_users_rec)) { | 274 ReduceDeoptState(outer_frame_state, effect, multiple_users_rec)) { |
| 275 if (node_multiused || (multiple_users && !clone)) { | 275 if (node_multiused || (multiple_users && !clone)) { |
| 276 TRACE(" Cloning #%d", node->id()); | 276 TRACE(" Cloning #%d", node->id()); |
| 277 node = clone = jsgraph()->graph()->CloneNode(node); | 277 node = clone = jsgraph()->graph()->CloneNode(node); |
| 278 TRACE(" to #%d\n", node->id()); | 278 TRACE(" to #%d\n", node->id()); |
| 279 } | 279 } |
| 280 NodeProperties::ReplaceFrameStateInput(node, 0, ret); | 280 NodeProperties::ReplaceFrameStateInput(node, ret); |
| 281 } | 281 } |
| 282 } | 282 } |
| 283 } | 283 } |
| 284 if (node->id() < static_cast<NodeId>(fully_reduced_.length())) { | 284 if (node->id() < static_cast<NodeId>(fully_reduced_.length())) { |
| 285 fully_reduced_.Add(node->id()); | 285 fully_reduced_.Add(node->id()); |
| 286 } | 286 } |
| 287 return clone; | 287 return clone; |
| 288 } | 288 } |
| 289 | 289 |
| 290 | 290 |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 337 } | 337 } |
| 338 } | 338 } |
| 339 #endif // DEBUG | 339 #endif // DEBUG |
| 340 } | 340 } |
| 341 | 341 |
| 342 Isolate* EscapeAnalysisReducer::isolate() const { return jsgraph_->isolate(); } | 342 Isolate* EscapeAnalysisReducer::isolate() const { return jsgraph_->isolate(); } |
| 343 | 343 |
| 344 } // namespace compiler | 344 } // namespace compiler |
| 345 } // namespace internal | 345 } // namespace internal |
| 346 } // namespace v8 | 346 } // namespace v8 |
| OLD | NEW |