| 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_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 5 #ifndef V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
| 6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
| 7 | 7 |
| 8 #include <cstring> | 8 #include <cstring> |
| 9 #include <iosfwd> | 9 #include <iosfwd> |
| 10 | 10 |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 V(DebugBreak) \ | 84 V(DebugBreak) \ |
| 85 V(DeclareGlobals) \ | 85 V(DeclareGlobals) \ |
| 86 V(Deoptimize) \ | 86 V(Deoptimize) \ |
| 87 V(Div) \ | 87 V(Div) \ |
| 88 V(DummyUse) \ | 88 V(DummyUse) \ |
| 89 V(EnterInlined) \ | 89 V(EnterInlined) \ |
| 90 V(EnvironmentMarker) \ | 90 V(EnvironmentMarker) \ |
| 91 V(ForceRepresentation) \ | 91 V(ForceRepresentation) \ |
| 92 V(ForInCacheArray) \ | 92 V(ForInCacheArray) \ |
| 93 V(ForInPrepareMap) \ | 93 V(ForInPrepareMap) \ |
| 94 V(GetCachedArrayIndex) \ | |
| 95 V(Goto) \ | 94 V(Goto) \ |
| 96 V(HasCachedArrayIndexAndBranch) \ | |
| 97 V(HasInstanceTypeAndBranch) \ | 95 V(HasInstanceTypeAndBranch) \ |
| 98 V(InnerAllocatedObject) \ | 96 V(InnerAllocatedObject) \ |
| 99 V(InvokeFunction) \ | 97 V(InvokeFunction) \ |
| 100 V(HasInPrototypeChainAndBranch) \ | 98 V(HasInPrototypeChainAndBranch) \ |
| 101 V(IsStringAndBranch) \ | 99 V(IsStringAndBranch) \ |
| 102 V(IsSmiAndBranch) \ | 100 V(IsSmiAndBranch) \ |
| 103 V(IsUndetectableAndBranch) \ | 101 V(IsUndetectableAndBranch) \ |
| 104 V(LeaveInlined) \ | 102 V(LeaveInlined) \ |
| 105 V(LoadContextSlot) \ | 103 V(LoadContextSlot) \ |
| 106 V(LoadFieldByIndex) \ | 104 V(LoadFieldByIndex) \ |
| (...skipping 4032 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4139 : HUnaryControlInstruction(value, NULL, NULL), from_(type), to_(type) { } | 4137 : HUnaryControlInstruction(value, NULL, NULL), from_(type), to_(type) { } |
| 4140 HHasInstanceTypeAndBranch(HValue* value, InstanceType from, InstanceType to) | 4138 HHasInstanceTypeAndBranch(HValue* value, InstanceType from, InstanceType to) |
| 4141 : HUnaryControlInstruction(value, NULL, NULL), from_(from), to_(to) { | 4139 : HUnaryControlInstruction(value, NULL, NULL), from_(from), to_(to) { |
| 4142 DCHECK(to == LAST_TYPE); // Others not implemented yet in backend. | 4140 DCHECK(to == LAST_TYPE); // Others not implemented yet in backend. |
| 4143 } | 4141 } |
| 4144 | 4142 |
| 4145 InstanceType from_; | 4143 InstanceType from_; |
| 4146 InstanceType to_; // Inclusive range, not all combinations work. | 4144 InstanceType to_; // Inclusive range, not all combinations work. |
| 4147 }; | 4145 }; |
| 4148 | 4146 |
| 4149 | |
| 4150 class HHasCachedArrayIndexAndBranch final : public HUnaryControlInstruction { | |
| 4151 public: | |
| 4152 DECLARE_INSTRUCTION_FACTORY_P1(HHasCachedArrayIndexAndBranch, HValue*); | |
| 4153 | |
| 4154 Representation RequiredInputRepresentation(int index) override { | |
| 4155 return Representation::Tagged(); | |
| 4156 } | |
| 4157 | |
| 4158 DECLARE_CONCRETE_INSTRUCTION(HasCachedArrayIndexAndBranch) | |
| 4159 private: | |
| 4160 explicit HHasCachedArrayIndexAndBranch(HValue* value) | |
| 4161 : HUnaryControlInstruction(value, NULL, NULL) { } | |
| 4162 }; | |
| 4163 | |
| 4164 | |
| 4165 class HGetCachedArrayIndex final : public HUnaryOperation { | |
| 4166 public: | |
| 4167 DECLARE_INSTRUCTION_FACTORY_P1(HGetCachedArrayIndex, HValue*); | |
| 4168 | |
| 4169 Representation RequiredInputRepresentation(int index) override { | |
| 4170 return Representation::Tagged(); | |
| 4171 } | |
| 4172 | |
| 4173 DECLARE_CONCRETE_INSTRUCTION(GetCachedArrayIndex) | |
| 4174 | |
| 4175 protected: | |
| 4176 bool DataEquals(HValue* other) override { return true; } | |
| 4177 | |
| 4178 private: | |
| 4179 explicit HGetCachedArrayIndex(HValue* value) : HUnaryOperation(value) { | |
| 4180 set_representation(Representation::Tagged()); | |
| 4181 SetFlag(kUseGVN); | |
| 4182 } | |
| 4183 | |
| 4184 bool IsDeletable() const override { return true; } | |
| 4185 }; | |
| 4186 | |
| 4187 | |
| 4188 class HClassOfTestAndBranch final : public HUnaryControlInstruction { | 4147 class HClassOfTestAndBranch final : public HUnaryControlInstruction { |
| 4189 public: | 4148 public: |
| 4190 DECLARE_INSTRUCTION_FACTORY_P2(HClassOfTestAndBranch, HValue*, | 4149 DECLARE_INSTRUCTION_FACTORY_P2(HClassOfTestAndBranch, HValue*, |
| 4191 Handle<String>); | 4150 Handle<String>); |
| 4192 | 4151 |
| 4193 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch) | 4152 DECLARE_CONCRETE_INSTRUCTION(ClassOfTestAndBranch) |
| 4194 | 4153 |
| 4195 Representation RequiredInputRepresentation(int index) override { | 4154 Representation RequiredInputRepresentation(int index) override { |
| 4196 return Representation::Tagged(); | 4155 return Representation::Tagged(); |
| 4197 } | 4156 } |
| (...skipping 2730 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6928 bool IsDeletable() const override { return true; } | 6887 bool IsDeletable() const override { return true; } |
| 6929 }; | 6888 }; |
| 6930 | 6889 |
| 6931 #undef DECLARE_INSTRUCTION | 6890 #undef DECLARE_INSTRUCTION |
| 6932 #undef DECLARE_CONCRETE_INSTRUCTION | 6891 #undef DECLARE_CONCRETE_INSTRUCTION |
| 6933 | 6892 |
| 6934 } // namespace internal | 6893 } // namespace internal |
| 6935 } // namespace v8 | 6894 } // namespace v8 |
| 6936 | 6895 |
| 6937 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 6896 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |