Chromium Code Reviews| 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.h" | 5 #include "src/compiler/escape-analysis.h" |
| 6 | 6 |
| 7 #include <limits> | 7 #include <limits> |
| 8 | 8 |
| 9 #include "src/base/flags.h" | 9 #include "src/base/flags.h" |
| 10 #include "src/bootstrapper.h" | 10 #include "src/bootstrapper.h" |
| (...skipping 671 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 682 break; | 682 break; |
| 683 case IrOpcode::kLoadField: | 683 case IrOpcode::kLoadField: |
| 684 case IrOpcode::kLoadElement: { | 684 case IrOpcode::kLoadElement: { |
| 685 if (Node* rep = object_analysis_->GetReplacement(node)) { | 685 if (Node* rep = object_analysis_->GetReplacement(node)) { |
| 686 if (IsAllocation(rep) && CheckUsesForEscape(node, rep)) { | 686 if (IsAllocation(rep) && CheckUsesForEscape(node, rep)) { |
| 687 RevisitInputs(rep); | 687 RevisitInputs(rep); |
| 688 RevisitUses(rep); | 688 RevisitUses(rep); |
| 689 } | 689 } |
| 690 } else { | 690 } else { |
| 691 Node* from = NodeProperties::GetValueInput(node, 0); | 691 Node* from = NodeProperties::GetValueInput(node, 0); |
| 692 from = object_analysis_->ResolveReplacement(from); | |
|
Tobias Tebbi
2017/02/15 14:16:05
This is a drive-by fix. It was sound before, but i
| |
| 692 if (SetEscaped(from)) { | 693 if (SetEscaped(from)) { |
| 693 TRACE("Setting #%d (%s) to escaped because of unresolved load #%i\n", | 694 TRACE("Setting #%d (%s) to escaped because of unresolved load #%i\n", |
| 694 from->id(), from->op()->mnemonic(), node->id()); | 695 from->id(), from->op()->mnemonic(), node->id()); |
| 695 RevisitInputs(from); | 696 RevisitInputs(from); |
| 696 RevisitUses(from); | 697 RevisitUses(from); |
| 697 } | 698 } |
| 698 } | 699 } |
| 699 | 700 |
| 700 RevisitUses(node); | 701 RevisitUses(node); |
| 701 break; | 702 break; |
| (...skipping 1084 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1786 } | 1787 } |
| 1787 } | 1788 } |
| 1788 return false; | 1789 return false; |
| 1789 } | 1790 } |
| 1790 | 1791 |
| 1791 Graph* EscapeAnalysis::graph() const { return status_analysis_->graph(); } | 1792 Graph* EscapeAnalysis::graph() const { return status_analysis_->graph(); } |
| 1792 | 1793 |
| 1793 } // namespace compiler | 1794 } // namespace compiler |
| 1794 } // namespace internal | 1795 } // namespace internal |
| 1795 } // namespace v8 | 1796 } // namespace v8 |
| OLD | NEW |