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/ast.h" | 5 #include "src/ast.h" |
6 #include "src/ast-numbering.h" | 6 #include "src/ast-numbering.h" |
7 #include "src/compiler/access-builder.h" | 7 #include "src/compiler/access-builder.h" |
8 #include "src/compiler/ast-graph-builder.h" | 8 #include "src/compiler/ast-graph-builder.h" |
9 #include "src/compiler/common-operator.h" | 9 #include "src/compiler/common-operator.h" |
10 #include "src/compiler/graph-inl.h" | 10 #include "src/compiler/graph-inl.h" |
(...skipping 389 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
400 Inlinee inlinee(visitor.GetCopy(graph.start()), visitor.GetCopy(graph.end())); | 400 Inlinee inlinee(visitor.GetCopy(graph.start()), visitor.GetCopy(graph.end())); |
401 | 401 |
402 if (FLAG_turbo_deoptimization) { | 402 if (FLAG_turbo_deoptimization) { |
403 Node* outer_frame_state = call.frame_state(); | 403 Node* outer_frame_state = call.frame_state(); |
404 // Insert argument adaptor frame if required. | 404 // Insert argument adaptor frame if required. |
405 if (call.formal_arguments() != inlinee.formal_parameters()) { | 405 if (call.formal_arguments() != inlinee.formal_parameters()) { |
406 outer_frame_state = | 406 outer_frame_state = |
407 CreateArgumentsAdaptorFrameState(&call, function, info.zone()); | 407 CreateArgumentsAdaptorFrameState(&call, function, info.zone()); |
408 } | 408 } |
409 | 409 |
410 for (NodeVectorConstIter it = visitor.copies().begin(); | 410 for (Node* node : visitor.copies()) { |
411 it != visitor.copies().end(); ++it) { | 411 if (node && node->opcode() == IrOpcode::kFrameState) { |
412 Node* node = *it; | |
413 if (node != NULL && node->opcode() == IrOpcode::kFrameState) { | |
414 AddClosureToFrameState(node, function); | 412 AddClosureToFrameState(node, function); |
415 NodeProperties::ReplaceFrameStateInput(node, outer_frame_state); | 413 NodeProperties::ReplaceFrameStateInput(node, outer_frame_state); |
416 } | 414 } |
417 } | 415 } |
418 } | 416 } |
419 | 417 |
420 inlinee.InlineAtCall(jsgraph_, call_node); | 418 inlinee.InlineAtCall(jsgraph_, call_node); |
421 } | 419 } |
422 | 420 |
423 | 421 |
(...skipping 56 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
480 info_->shared_info()->DebugName()->ToCString().get()); | 478 info_->shared_info()->DebugName()->ToCString().get()); |
481 } | 479 } |
482 NodeProperties::ReplaceWithValue(call_node, r.first, r.second); | 480 NodeProperties::ReplaceWithValue(call_node, r.first, r.second); |
483 call_node->RemoveAllInputs(); | 481 call_node->RemoveAllInputs(); |
484 DCHECK_EQ(0, call_node->UseCount()); | 482 DCHECK_EQ(0, call_node->UseCount()); |
485 } | 483 } |
486 } | 484 } |
487 } | 485 } |
488 } | 486 } |
489 } // namespace v8::internal::compiler | 487 } // namespace v8::internal::compiler |
OLD | NEW |