| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Redistribution and use in source and binary forms, with or without | 2 // Redistribution and use in source and binary forms, with or without |
| 3 // modification, are permitted provided that the following conditions are | 3 // modification, are permitted provided that the following conditions are |
| 4 // met: | 4 // met: |
| 5 // | 5 // |
| 6 // * Redistributions of source code must retain the above copyright | 6 // * Redistributions of source code must retain the above copyright |
| 7 // notice, this list of conditions and the following disclaimer. | 7 // notice, this list of conditions and the following disclaimer. |
| 8 // * Redistributions in binary form must reproduce the above | 8 // * Redistributions in binary form must reproduce the above |
| 9 // copyright notice, this list of conditions and the following | 9 // copyright notice, this list of conditions and the following |
| 10 // disclaimer in the documentation and/or other materials provided | 10 // disclaimer in the documentation and/or other materials provided |
| (...skipping 845 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 856 case HValue::kArgumentsLength: | 856 case HValue::kArgumentsLength: |
| 857 case HValue::kArgumentsObject: | 857 case HValue::kArgumentsObject: |
| 858 case HValue::kBoundsCheckBaseIndexInformation: | 858 case HValue::kBoundsCheckBaseIndexInformation: |
| 859 case HValue::kCapturedObject: | 859 case HValue::kCapturedObject: |
| 860 case HValue::kClampToUint8: | 860 case HValue::kClampToUint8: |
| 861 case HValue::kConstant: | 861 case HValue::kConstant: |
| 862 case HValue::kContext: | 862 case HValue::kContext: |
| 863 case HValue::kDateField: | 863 case HValue::kDateField: |
| 864 case HValue::kDebugBreak: | 864 case HValue::kDebugBreak: |
| 865 case HValue::kDeclareGlobals: | 865 case HValue::kDeclareGlobals: |
| 866 case HValue::kDiv: | |
| 867 case HValue::kDummyUse: | 866 case HValue::kDummyUse: |
| 868 case HValue::kEnterInlined: | 867 case HValue::kEnterInlined: |
| 869 case HValue::kEnvironmentMarker: | 868 case HValue::kEnvironmentMarker: |
| 870 case HValue::kForInCacheArray: | 869 case HValue::kForInCacheArray: |
| 871 case HValue::kForInPrepareMap: | 870 case HValue::kForInPrepareMap: |
| 872 case HValue::kFunctionLiteral: | 871 case HValue::kFunctionLiteral: |
| 873 case HValue::kGetCachedArrayIndex: | 872 case HValue::kGetCachedArrayIndex: |
| 874 case HValue::kGoto: | 873 case HValue::kGoto: |
| 875 case HValue::kInnerAllocatedObject: | 874 case HValue::kInnerAllocatedObject: |
| 876 case HValue::kInstanceOf: | 875 case HValue::kInstanceOf: |
| 877 case HValue::kInstanceOfKnownGlobal: | 876 case HValue::kInstanceOfKnownGlobal: |
| 878 case HValue::kInvokeFunction: | 877 case HValue::kInvokeFunction: |
| 879 case HValue::kLeaveInlined: | 878 case HValue::kLeaveInlined: |
| 880 case HValue::kLoadContextSlot: | 879 case HValue::kLoadContextSlot: |
| 881 case HValue::kLoadFieldByIndex: | 880 case HValue::kLoadFieldByIndex: |
| 882 case HValue::kLoadFunctionPrototype: | 881 case HValue::kLoadFunctionPrototype: |
| 883 case HValue::kLoadGlobalCell: | 882 case HValue::kLoadGlobalCell: |
| 884 case HValue::kLoadGlobalGeneric: | 883 case HValue::kLoadGlobalGeneric: |
| 885 case HValue::kLoadKeyed: | 884 case HValue::kLoadKeyed: |
| 886 case HValue::kLoadKeyedGeneric: | 885 case HValue::kLoadKeyedGeneric: |
| 887 case HValue::kLoadNamedField: | 886 case HValue::kLoadNamedField: |
| 888 case HValue::kLoadNamedGeneric: | 887 case HValue::kLoadNamedGeneric: |
| 889 case HValue::kLoadRoot: | 888 case HValue::kLoadRoot: |
| 890 case HValue::kMapEnumLength: | 889 case HValue::kMapEnumLength: |
| 891 case HValue::kMathFloorOfDiv: | 890 case HValue::kMathFloorOfDiv: |
| 892 case HValue::kMathMinMax: | 891 case HValue::kMathMinMax: |
| 893 case HValue::kMod: | |
| 894 case HValue::kMul: | 892 case HValue::kMul: |
| 895 case HValue::kOsrEntry: | 893 case HValue::kOsrEntry: |
| 896 case HValue::kParameter: | 894 case HValue::kParameter: |
| 897 case HValue::kPower: | 895 case HValue::kPower: |
| 898 case HValue::kPushArgument: | 896 case HValue::kPushArgument: |
| 899 case HValue::kRor: | 897 case HValue::kRor: |
| 900 case HValue::kSar: | 898 case HValue::kSar: |
| 901 case HValue::kSeqStringGetChar: | 899 case HValue::kSeqStringGetChar: |
| 902 case HValue::kSeqStringSetChar: | 900 case HValue::kSeqStringSetChar: |
| 903 case HValue::kShl: | 901 case HValue::kShl: |
| (...skipping 26 matching lines...) Expand all Loading... |
| 930 case HValue::kChange: | 928 case HValue::kChange: |
| 931 case HValue::kCompareGeneric: | 929 case HValue::kCompareGeneric: |
| 932 // These instructions might deoptimize if they are not primitive. | 930 // These instructions might deoptimize if they are not primitive. |
| 933 if (!HasPrimitiveRepresentation(this)) return true; | 931 if (!HasPrimitiveRepresentation(this)) return true; |
| 934 for (int i = 0; i < OperandCount(); i++) { | 932 for (int i = 0; i < OperandCount(); i++) { |
| 935 HValue* input = OperandAt(i); | 933 HValue* input = OperandAt(i); |
| 936 if (!HasPrimitiveRepresentation(input)) return true; | 934 if (!HasPrimitiveRepresentation(input)) return true; |
| 937 } | 935 } |
| 938 return false; | 936 return false; |
| 939 default: | 937 default: |
| 938 // TODO(titzer): kDiv and kMod can deoptimize under some circumstances. |
| 940 return true; | 939 return true; |
| 941 } | 940 } |
| 942 } | 941 } |
| 943 | 942 |
| 944 | 943 |
| 945 void HDummyUse::PrintDataTo(StringStream* stream) { | 944 void HDummyUse::PrintDataTo(StringStream* stream) { |
| 946 value()->PrintNameTo(stream); | 945 value()->PrintNameTo(stream); |
| 947 } | 946 } |
| 948 | 947 |
| 949 | 948 |
| (...skipping 3744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4694 break; | 4693 break; |
| 4695 case kExternalMemory: | 4694 case kExternalMemory: |
| 4696 stream->Add("[external-memory]"); | 4695 stream->Add("[external-memory]"); |
| 4697 break; | 4696 break; |
| 4698 } | 4697 } |
| 4699 | 4698 |
| 4700 stream->Add("@%d", offset()); | 4699 stream->Add("@%d", offset()); |
| 4701 } | 4700 } |
| 4702 | 4701 |
| 4703 } } // namespace v8::internal | 4702 } } // namespace v8::internal |
| OLD | NEW |