| 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/base/bits.h" | 7 #include "src/base/bits.h" |
| 8 #include "src/double.h" | 8 #include "src/double.h" |
| 9 #include "src/factory.h" | 9 #include "src/factory.h" |
| 10 #include "src/hydrogen-infer-representation.h" | 10 #include "src/hydrogen-infer-representation.h" |
| (...skipping 765 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 776 if (use.value()->IsInstruction()) { | 776 if (use.value()->IsInstruction()) { |
| 777 DCHECK(HInstruction::cast(use.value())->IsLinked()); | 777 DCHECK(HInstruction::cast(use.value())->IsLinked()); |
| 778 } | 778 } |
| 779 } | 779 } |
| 780 } | 780 } |
| 781 #endif | 781 #endif |
| 782 | 782 |
| 783 | 783 |
| 784 bool HInstruction::CanDeoptimize() { | 784 bool HInstruction::CanDeoptimize() { |
| 785 // TODO(titzer): make this a virtual method? | 785 // TODO(titzer): make this a virtual method? |
| 786 // TODO(all): Some of these may be incorrect, since any method that can |
| 787 // collect can provoke lazy deoptimization. Methods like CallNew can |
| 788 // certainly do that. |
| 786 switch (opcode()) { | 789 switch (opcode()) { |
| 787 case HValue::kAbnormalExit: | 790 case HValue::kAbnormalExit: |
| 788 case HValue::kAccessArgumentsAt: | 791 case HValue::kAccessArgumentsAt: |
| 789 case HValue::kAllocate: | 792 case HValue::kAllocate: |
| 790 case HValue::kArgumentsElements: | 793 case HValue::kArgumentsElements: |
| 791 case HValue::kArgumentsLength: | 794 case HValue::kArgumentsLength: |
| 792 case HValue::kArgumentsObject: | 795 case HValue::kArgumentsObject: |
| 793 case HValue::kBlockEntry: | 796 case HValue::kBlockEntry: |
| 794 case HValue::kBoundsCheckBaseIndexInformation: | 797 case HValue::kBoundsCheckBaseIndexInformation: |
| 795 case HValue::kCallFunction: | 798 case HValue::kCallFunction: |
| 796 case HValue::kCallNew: | 799 case HValue::kCallNew: |
| 797 case HValue::kCallNewArray: | 800 case HValue::kCallNewArray: |
| 798 case HValue::kCallStub: | 801 case HValue::kCallStub: |
| 799 case HValue::kCallWithDescriptor: | |
| 800 case HValue::kCapturedObject: | 802 case HValue::kCapturedObject: |
| 801 case HValue::kClassOfTestAndBranch: | 803 case HValue::kClassOfTestAndBranch: |
| 802 case HValue::kCompareGeneric: | 804 case HValue::kCompareGeneric: |
| 803 case HValue::kCompareHoleAndBranch: | 805 case HValue::kCompareHoleAndBranch: |
| 804 case HValue::kCompareMap: | 806 case HValue::kCompareMap: |
| 805 case HValue::kCompareMinusZeroAndBranch: | 807 case HValue::kCompareMinusZeroAndBranch: |
| 806 case HValue::kCompareNumericAndBranch: | 808 case HValue::kCompareNumericAndBranch: |
| 807 case HValue::kCompareObjectEqAndBranch: | 809 case HValue::kCompareObjectEqAndBranch: |
| 808 case HValue::kConstant: | 810 case HValue::kConstant: |
| 809 case HValue::kConstructDouble: | 811 case HValue::kConstructDouble: |
| (...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 return false; | 858 return false; |
| 857 | 859 |
| 858 case HValue::kAdd: | 860 case HValue::kAdd: |
| 859 case HValue::kAllocateBlockContext: | 861 case HValue::kAllocateBlockContext: |
| 860 case HValue::kApplyArguments: | 862 case HValue::kApplyArguments: |
| 861 case HValue::kBitwise: | 863 case HValue::kBitwise: |
| 862 case HValue::kBoundsCheck: | 864 case HValue::kBoundsCheck: |
| 863 case HValue::kBranch: | 865 case HValue::kBranch: |
| 864 case HValue::kCallJSFunction: | 866 case HValue::kCallJSFunction: |
| 865 case HValue::kCallRuntime: | 867 case HValue::kCallRuntime: |
| 868 case HValue::kCallWithDescriptor: |
| 866 case HValue::kChange: | 869 case HValue::kChange: |
| 867 case HValue::kCheckHeapObject: | 870 case HValue::kCheckHeapObject: |
| 868 case HValue::kCheckInstanceType: | 871 case HValue::kCheckInstanceType: |
| 869 case HValue::kCheckMapValue: | 872 case HValue::kCheckMapValue: |
| 870 case HValue::kCheckMaps: | 873 case HValue::kCheckMaps: |
| 871 case HValue::kCheckSmi: | 874 case HValue::kCheckSmi: |
| 872 case HValue::kCheckValue: | 875 case HValue::kCheckValue: |
| 873 case HValue::kClampToUint8: | 876 case HValue::kClampToUint8: |
| 874 case HValue::kDateField: | 877 case HValue::kDateField: |
| 875 case HValue::kDeoptimize: | 878 case HValue::kDeoptimize: |
| (...skipping 3924 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4800 break; | 4803 break; |
| 4801 case HObjectAccess::kExternalMemory: | 4804 case HObjectAccess::kExternalMemory: |
| 4802 os << "[external-memory]"; | 4805 os << "[external-memory]"; |
| 4803 break; | 4806 break; |
| 4804 } | 4807 } |
| 4805 | 4808 |
| 4806 return os << "@" << access.offset(); | 4809 return os << "@" << access.offset(); |
| 4807 } | 4810 } |
| 4808 | 4811 |
| 4809 } } // namespace v8::internal | 4812 } } // namespace v8::internal |
| OLD | NEW |