| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/double.h" | 7 #include "src/double.h" |
| 8 #include "src/factory.h" | 8 #include "src/factory.h" |
| 9 #include "src/hydrogen-infer-representation.h" | 9 #include "src/hydrogen-infer-representation.h" |
| 10 #include "src/property-details-inl.h" | 10 #include "src/property-details-inl.h" |
| (...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 773 if (use.value()->IsInstruction()) { | 773 if (use.value()->IsInstruction()) { |
| 774 ASSERT(HInstruction::cast(use.value())->IsLinked()); | 774 ASSERT(HInstruction::cast(use.value())->IsLinked()); |
| 775 } | 775 } |
| 776 } | 776 } |
| 777 } | 777 } |
| 778 #endif | 778 #endif |
| 779 | 779 |
| 780 | 780 |
| 781 bool HInstruction::CanDeoptimize() { | 781 bool HInstruction::CanDeoptimize() { |
| 782 // TODO(titzer): make this a virtual method? | 782 // TODO(titzer): make this a virtual method? |
| 783 // TODO(all): Some of these may be incorrect, since any method that can |
| 784 // collect can provoke lazy deoptimization. Methods like CallNew can |
| 785 // certainly do that. |
| 783 switch (opcode()) { | 786 switch (opcode()) { |
| 784 case HValue::kAbnormalExit: | 787 case HValue::kAbnormalExit: |
| 785 case HValue::kAccessArgumentsAt: | 788 case HValue::kAccessArgumentsAt: |
| 786 case HValue::kAllocate: | 789 case HValue::kAllocate: |
| 787 case HValue::kArgumentsElements: | 790 case HValue::kArgumentsElements: |
| 788 case HValue::kArgumentsLength: | 791 case HValue::kArgumentsLength: |
| 789 case HValue::kArgumentsObject: | 792 case HValue::kArgumentsObject: |
| 790 case HValue::kBlockEntry: | 793 case HValue::kBlockEntry: |
| 791 case HValue::kBoundsCheckBaseIndexInformation: | 794 case HValue::kBoundsCheckBaseIndexInformation: |
| 792 case HValue::kCallFunction: | 795 case HValue::kCallFunction: |
| 793 case HValue::kCallNew: | 796 case HValue::kCallNew: |
| 794 case HValue::kCallNewArray: | 797 case HValue::kCallNewArray: |
| 795 case HValue::kCallStub: | 798 case HValue::kCallStub: |
| 796 case HValue::kCallWithDescriptor: | |
| 797 case HValue::kCapturedObject: | 799 case HValue::kCapturedObject: |
| 798 case HValue::kClassOfTestAndBranch: | 800 case HValue::kClassOfTestAndBranch: |
| 799 case HValue::kCompareGeneric: | 801 case HValue::kCompareGeneric: |
| 800 case HValue::kCompareHoleAndBranch: | 802 case HValue::kCompareHoleAndBranch: |
| 801 case HValue::kCompareMap: | 803 case HValue::kCompareMap: |
| 802 case HValue::kCompareMinusZeroAndBranch: | 804 case HValue::kCompareMinusZeroAndBranch: |
| 803 case HValue::kCompareNumericAndBranch: | 805 case HValue::kCompareNumericAndBranch: |
| 804 case HValue::kCompareObjectEqAndBranch: | 806 case HValue::kCompareObjectEqAndBranch: |
| 805 case HValue::kConstant: | 807 case HValue::kConstant: |
| 806 case HValue::kConstructDouble: | 808 case HValue::kConstructDouble: |
| (...skipping 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 852 return false; | 854 return false; |
| 853 | 855 |
| 854 case HValue::kAdd: | 856 case HValue::kAdd: |
| 855 case HValue::kAllocateBlockContext: | 857 case HValue::kAllocateBlockContext: |
| 856 case HValue::kApplyArguments: | 858 case HValue::kApplyArguments: |
| 857 case HValue::kBitwise: | 859 case HValue::kBitwise: |
| 858 case HValue::kBoundsCheck: | 860 case HValue::kBoundsCheck: |
| 859 case HValue::kBranch: | 861 case HValue::kBranch: |
| 860 case HValue::kCallJSFunction: | 862 case HValue::kCallJSFunction: |
| 861 case HValue::kCallRuntime: | 863 case HValue::kCallRuntime: |
| 864 case HValue::kCallWithDescriptor: |
| 862 case HValue::kChange: | 865 case HValue::kChange: |
| 863 case HValue::kCheckHeapObject: | 866 case HValue::kCheckHeapObject: |
| 864 case HValue::kCheckInstanceType: | 867 case HValue::kCheckInstanceType: |
| 865 case HValue::kCheckMapValue: | 868 case HValue::kCheckMapValue: |
| 866 case HValue::kCheckMaps: | 869 case HValue::kCheckMaps: |
| 867 case HValue::kCheckSmi: | 870 case HValue::kCheckSmi: |
| 868 case HValue::kCheckValue: | 871 case HValue::kCheckValue: |
| 869 case HValue::kClampToUint8: | 872 case HValue::kClampToUint8: |
| 870 case HValue::kDateField: | 873 case HValue::kDateField: |
| 871 case HValue::kDeoptimize: | 874 case HValue::kDeoptimize: |
| (...skipping 3899 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4771 break; | 4774 break; |
| 4772 case HObjectAccess::kExternalMemory: | 4775 case HObjectAccess::kExternalMemory: |
| 4773 os << "[external-memory]"; | 4776 os << "[external-memory]"; |
| 4774 break; | 4777 break; |
| 4775 } | 4778 } |
| 4776 | 4779 |
| 4777 return os << "@" << access.offset(); | 4780 return os << "@" << access.offset(); |
| 4778 } | 4781 } |
| 4779 | 4782 |
| 4780 } } // namespace v8::internal | 4783 } } // namespace v8::internal |
| OLD | NEW |