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 803 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
814 case IrOpcode::kStringEqual: | 814 case IrOpcode::kStringEqual: |
815 case IrOpcode::kStringLessThan: | 815 case IrOpcode::kStringLessThan: |
816 case IrOpcode::kStringLessThanOrEqual: | 816 case IrOpcode::kStringLessThanOrEqual: |
817 case IrOpcode::kTypeGuard: | 817 case IrOpcode::kTypeGuard: |
818 case IrOpcode::kPlainPrimitiveToNumber: | 818 case IrOpcode::kPlainPrimitiveToNumber: |
819 case IrOpcode::kPlainPrimitiveToWord32: | 819 case IrOpcode::kPlainPrimitiveToWord32: |
820 case IrOpcode::kPlainPrimitiveToFloat64: | 820 case IrOpcode::kPlainPrimitiveToFloat64: |
821 case IrOpcode::kStringCharAt: | 821 case IrOpcode::kStringCharAt: |
822 case IrOpcode::kStringCharCodeAt: | 822 case IrOpcode::kStringCharCodeAt: |
823 case IrOpcode::kObjectIsCallable: | 823 case IrOpcode::kObjectIsCallable: |
| 824 case IrOpcode::kObjectIsNonCallable: |
824 case IrOpcode::kObjectIsNumber: | 825 case IrOpcode::kObjectIsNumber: |
825 case IrOpcode::kObjectIsReceiver: | 826 case IrOpcode::kObjectIsReceiver: |
826 case IrOpcode::kObjectIsString: | 827 case IrOpcode::kObjectIsString: |
827 case IrOpcode::kObjectIsUndetectable: | 828 case IrOpcode::kObjectIsUndetectable: |
828 if (SetEscaped(rep)) { | 829 if (SetEscaped(rep)) { |
829 TRACE("Setting #%d (%s) to escaped because of use by #%d (%s)\n", | 830 TRACE("Setting #%d (%s) to escaped because of use by #%d (%s)\n", |
830 rep->id(), rep->op()->mnemonic(), use->id(), | 831 rep->id(), rep->op()->mnemonic(), use->id(), |
831 use->op()->mnemonic()); | 832 use->op()->mnemonic()); |
832 return true; | 833 return true; |
833 } | 834 } |
834 break; | 835 break; |
835 default: | 836 default: |
836 if (use->op()->EffectInputCount() == 0 && | 837 if (use->op()->EffectInputCount() == 0 && |
837 uses->op()->EffectInputCount() > 0 && | 838 uses->op()->EffectInputCount() > 0 && |
838 !IrOpcode::IsJsOpcode(use->opcode())) { | 839 !IrOpcode::IsJsOpcode(use->opcode())) { |
839 TRACE("Encountered unaccounted use by #%d (%s)\n", use->id(), | 840 V8_Fatal(__FILE__, __LINE__, |
840 use->op()->mnemonic()); | 841 "Encountered unaccounted use by #%d (%s)\n", use->id(), |
841 UNREACHABLE(); | 842 use->op()->mnemonic()); |
842 } | 843 } |
843 if (SetEscaped(rep)) { | 844 if (SetEscaped(rep)) { |
844 TRACE("Setting #%d (%s) to escaped because of use by #%d (%s)\n", | 845 TRACE("Setting #%d (%s) to escaped because of use by #%d (%s)\n", |
845 rep->id(), rep->op()->mnemonic(), use->id(), | 846 rep->id(), rep->op()->mnemonic(), use->id(), |
846 use->op()->mnemonic()); | 847 use->op()->mnemonic()); |
847 return true; | 848 return true; |
848 } | 849 } |
849 } | 850 } |
850 } | 851 } |
851 return false; | 852 return false; |
(...skipping 861 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1713 } | 1714 } |
1714 } | 1715 } |
1715 return false; | 1716 return false; |
1716 } | 1717 } |
1717 | 1718 |
1718 Graph* EscapeAnalysis::graph() const { return status_analysis_->graph(); } | 1719 Graph* EscapeAnalysis::graph() const { return status_analysis_->graph(); } |
1719 | 1720 |
1720 } // namespace compiler | 1721 } // namespace compiler |
1721 } // namespace internal | 1722 } // namespace internal |
1722 } // namespace v8 | 1723 } // namespace v8 |
OLD | NEW |