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 776 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
787 case IrOpcode::kObjectIsSmi: | 787 case IrOpcode::kObjectIsSmi: |
788 if (!IsAllocation(rep) && SetEscaped(rep)) { | 788 if (!IsAllocation(rep) && SetEscaped(rep)) { |
789 TRACE("Setting #%d (%s) to escaped because of use by #%d (%s)\n", | 789 TRACE("Setting #%d (%s) to escaped because of use by #%d (%s)\n", |
790 rep->id(), rep->op()->mnemonic(), use->id(), | 790 rep->id(), rep->op()->mnemonic(), use->id(), |
791 use->op()->mnemonic()); | 791 use->op()->mnemonic()); |
792 return true; | 792 return true; |
793 } | 793 } |
794 break; | 794 break; |
795 case IrOpcode::kSelect: | 795 case IrOpcode::kSelect: |
796 case IrOpcode::kTypeGuard: | 796 case IrOpcode::kTypeGuard: |
| 797 // TODO(mstarzinger): The following list of operators will eventually be |
| 798 // handled by the EscapeAnalysisReducer (similar to ObjectIsSmi). |
| 799 case IrOpcode::kObjectIsCallable: |
| 800 case IrOpcode::kObjectIsNumber: |
| 801 case IrOpcode::kObjectIsString: |
| 802 case IrOpcode::kObjectIsUndetectable: |
797 if (SetEscaped(rep)) { | 803 if (SetEscaped(rep)) { |
798 TRACE("Setting #%d (%s) to escaped because of use by #%d (%s)\n", | 804 TRACE("Setting #%d (%s) to escaped because of use by #%d (%s)\n", |
799 rep->id(), rep->op()->mnemonic(), use->id(), | 805 rep->id(), rep->op()->mnemonic(), use->id(), |
800 use->op()->mnemonic()); | 806 use->op()->mnemonic()); |
801 return true; | 807 return true; |
802 } | 808 } |
803 break; | 809 break; |
804 default: | 810 default: |
805 if (use->op()->EffectInputCount() == 0 && | 811 if (use->op()->EffectInputCount() == 0 && |
806 uses->op()->EffectInputCount() > 0 && | 812 uses->op()->EffectInputCount() > 0 && |
(...skipping 784 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1591 } | 1597 } |
1592 } | 1598 } |
1593 return false; | 1599 return false; |
1594 } | 1600 } |
1595 | 1601 |
1596 Graph* EscapeAnalysis::graph() const { return status_analysis_->graph(); } | 1602 Graph* EscapeAnalysis::graph() const { return status_analysis_->graph(); } |
1597 | 1603 |
1598 } // namespace compiler | 1604 } // namespace compiler |
1599 } // namespace internal | 1605 } // namespace internal |
1600 } // namespace v8 | 1606 } // namespace v8 |
OLD | NEW |