| 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 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ | 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ |
| 6 #define V8_HYDROGEN_INSTRUCTIONS_H_ | 6 #define V8_HYDROGEN_INSTRUCTIONS_H_ |
| 7 | 7 |
| 8 #include <cstring> | 8 #include <cstring> |
| 9 #include <iosfwd> | 9 #include <iosfwd> |
| 10 | 10 |
| (...skipping 52 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 63 V(Branch) \ | 63 V(Branch) \ |
| 64 V(CallWithDescriptor) \ | 64 V(CallWithDescriptor) \ |
| 65 V(CallJSFunction) \ | 65 V(CallJSFunction) \ |
| 66 V(CallFunction) \ | 66 V(CallFunction) \ |
| 67 V(CallNew) \ | 67 V(CallNew) \ |
| 68 V(CallNewArray) \ | 68 V(CallNewArray) \ |
| 69 V(CallRuntime) \ | 69 V(CallRuntime) \ |
| 70 V(CallStub) \ | 70 V(CallStub) \ |
| 71 V(CapturedObject) \ | 71 V(CapturedObject) \ |
| 72 V(Change) \ | 72 V(Change) \ |
| 73 V(CheckArrayBufferNotNeutered) \ |
| 73 V(CheckHeapObject) \ | 74 V(CheckHeapObject) \ |
| 74 V(CheckInstanceType) \ | 75 V(CheckInstanceType) \ |
| 75 V(CheckMaps) \ | 76 V(CheckMaps) \ |
| 76 V(CheckMapValue) \ | 77 V(CheckMapValue) \ |
| 77 V(CheckSmi) \ | 78 V(CheckSmi) \ |
| 78 V(CheckValue) \ | 79 V(CheckValue) \ |
| 79 V(ClampToUint8) \ | 80 V(ClampToUint8) \ |
| 80 V(ClassOfTestAndBranch) \ | 81 V(ClassOfTestAndBranch) \ |
| 81 V(CompareNumericAndBranch) \ | 82 V(CompareNumericAndBranch) \ |
| 82 V(CompareHoleAndBranch) \ | 83 V(CompareHoleAndBranch) \ |
| (...skipping 2862 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2945 bool DataEquals(HValue* other) override { return true; } | 2946 bool DataEquals(HValue* other) override { return true; } |
| 2946 | 2947 |
| 2947 private: | 2948 private: |
| 2948 explicit HCheckSmi(HValue* value) : HUnaryOperation(value, HType::Smi()) { | 2949 explicit HCheckSmi(HValue* value) : HUnaryOperation(value, HType::Smi()) { |
| 2949 set_representation(Representation::Smi()); | 2950 set_representation(Representation::Smi()); |
| 2950 SetFlag(kUseGVN); | 2951 SetFlag(kUseGVN); |
| 2951 } | 2952 } |
| 2952 }; | 2953 }; |
| 2953 | 2954 |
| 2954 | 2955 |
| 2956 class HCheckArrayBufferNotNeutered final : public HUnaryOperation { |
| 2957 public: |
| 2958 DECLARE_INSTRUCTION_FACTORY_P1(HCheckArrayBufferNotNeutered, HValue*); |
| 2959 |
| 2960 bool HasEscapingOperandAt(int index) override { return false; } |
| 2961 Representation RequiredInputRepresentation(int index) override { |
| 2962 return Representation::Tagged(); |
| 2963 } |
| 2964 |
| 2965 HType CalculateInferredType() override { |
| 2966 if (value()->type().IsHeapObject()) return value()->type(); |
| 2967 return HType::HeapObject(); |
| 2968 } |
| 2969 |
| 2970 DECLARE_CONCRETE_INSTRUCTION(CheckArrayBufferNotNeutered) |
| 2971 |
| 2972 protected: |
| 2973 bool DataEquals(HValue* other) override { return true; } |
| 2974 int RedefinedOperandIndex() override { return 0; } |
| 2975 |
| 2976 private: |
| 2977 explicit HCheckArrayBufferNotNeutered(HValue* value) |
| 2978 : HUnaryOperation(value) { |
| 2979 set_representation(Representation::Tagged()); |
| 2980 SetFlag(kUseGVN); |
| 2981 SetDependsOnFlag(kCalls); |
| 2982 } |
| 2983 }; |
| 2984 |
| 2985 |
| 2955 class HCheckHeapObject final : public HUnaryOperation { | 2986 class HCheckHeapObject final : public HUnaryOperation { |
| 2956 public: | 2987 public: |
| 2957 DECLARE_INSTRUCTION_FACTORY_P1(HCheckHeapObject, HValue*); | 2988 DECLARE_INSTRUCTION_FACTORY_P1(HCheckHeapObject, HValue*); |
| 2958 | 2989 |
| 2959 bool HasEscapingOperandAt(int index) override { return false; } | 2990 bool HasEscapingOperandAt(int index) override { return false; } |
| 2960 Representation RequiredInputRepresentation(int index) override { | 2991 Representation RequiredInputRepresentation(int index) override { |
| 2961 return Representation::Tagged(); | 2992 return Representation::Tagged(); |
| 2962 } | 2993 } |
| 2963 | 2994 |
| 2964 HType CalculateInferredType() override { | 2995 HType CalculateInferredType() override { |
| (...skipping 4853 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7818 }; | 7849 }; |
| 7819 | 7850 |
| 7820 | 7851 |
| 7821 | 7852 |
| 7822 #undef DECLARE_INSTRUCTION | 7853 #undef DECLARE_INSTRUCTION |
| 7823 #undef DECLARE_CONCRETE_INSTRUCTION | 7854 #undef DECLARE_CONCRETE_INSTRUCTION |
| 7824 | 7855 |
| 7825 } } // namespace v8::internal | 7856 } } // namespace v8::internal |
| 7826 | 7857 |
| 7827 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7858 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |