OLD | NEW |
1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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 153 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
164 V(StoreNamedGeneric) \ | 164 V(StoreNamedGeneric) \ |
165 V(StringAdd) \ | 165 V(StringAdd) \ |
166 V(StringCharCodeAt) \ | 166 V(StringCharCodeAt) \ |
167 V(StringCharFromCode) \ | 167 V(StringCharFromCode) \ |
168 V(StringLength) \ | 168 V(StringLength) \ |
169 V(Sub) \ | 169 V(Sub) \ |
170 V(ThisFunction) \ | 170 V(ThisFunction) \ |
171 V(Throw) \ | 171 V(Throw) \ |
172 V(ToFastProperties) \ | 172 V(ToFastProperties) \ |
173 V(ToInt32) \ | 173 V(ToInt32) \ |
| 174 V(TransitionElementsKind) \ |
174 V(Typeof) \ | 175 V(Typeof) \ |
175 V(TypeofIsAndBranch) \ | 176 V(TypeofIsAndBranch) \ |
176 V(UnaryMathOperation) \ | 177 V(UnaryMathOperation) \ |
177 V(UnknownOSRValue) \ | 178 V(UnknownOSRValue) \ |
178 V(UseConst) \ | 179 V(UseConst) \ |
179 V(ValueOf) | 180 V(ValueOf) |
180 | 181 |
181 #define GVN_FLAG_LIST(V) \ | 182 #define GVN_FLAG_LIST(V) \ |
182 V(Calls) \ | 183 V(Calls) \ |
183 V(InobjectFields) \ | 184 V(InobjectFields) \ |
(...skipping 3695 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3879 | 3880 |
3880 virtual void PrintDataTo(StringStream* stream); | 3881 virtual void PrintDataTo(StringStream* stream); |
3881 | 3882 |
3882 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric) | 3883 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric) |
3883 | 3884 |
3884 private: | 3885 private: |
3885 bool strict_mode_; | 3886 bool strict_mode_; |
3886 }; | 3887 }; |
3887 | 3888 |
3888 | 3889 |
| 3890 class HTransitionElementsKind: public HTemplateInstruction<1> { |
| 3891 public: |
| 3892 HTransitionElementsKind(HValue* object, |
| 3893 Handle<Map> original_map, |
| 3894 Handle<Map> transitioned_map) |
| 3895 : original_map_(original_map), |
| 3896 transitioned_map_(transitioned_map) { |
| 3897 SetOperandAt(0, object); |
| 3898 SetFlag(kUseGVN); |
| 3899 SetFlag(kDependsOnMaps); |
| 3900 set_representation(Representation::Tagged()); |
| 3901 } |
| 3902 |
| 3903 virtual Representation RequiredInputRepresentation(int index) { |
| 3904 return Representation::Tagged(); |
| 3905 } |
| 3906 |
| 3907 HValue* object() { return OperandAt(0); } |
| 3908 Handle<Map> original_map() { return original_map_; } |
| 3909 Handle<Map> transitioned_map() { return transitioned_map_; } |
| 3910 |
| 3911 virtual void PrintDataTo(StringStream* stream); |
| 3912 |
| 3913 DECLARE_CONCRETE_INSTRUCTION(TransitionElementsKind) |
| 3914 |
| 3915 protected: |
| 3916 virtual bool DataEquals(HValue* other) { |
| 3917 HTransitionElementsKind* instr = HTransitionElementsKind::cast(other); |
| 3918 return original_map_.is_identical_to(instr->original_map()) && |
| 3919 transitioned_map_.is_identical_to(instr->transitioned_map()); |
| 3920 } |
| 3921 |
| 3922 private: |
| 3923 Handle<Map> original_map_; |
| 3924 Handle<Map> transitioned_map_; |
| 3925 }; |
| 3926 |
| 3927 |
3889 class HStringAdd: public HBinaryOperation { | 3928 class HStringAdd: public HBinaryOperation { |
3890 public: | 3929 public: |
3891 HStringAdd(HValue* context, HValue* left, HValue* right) | 3930 HStringAdd(HValue* context, HValue* left, HValue* right) |
3892 : HBinaryOperation(context, left, right) { | 3931 : HBinaryOperation(context, left, right) { |
3893 set_representation(Representation::Tagged()); | 3932 set_representation(Representation::Tagged()); |
3894 SetFlag(kUseGVN); | 3933 SetFlag(kUseGVN); |
3895 SetFlag(kDependsOnMaps); | 3934 SetFlag(kDependsOnMaps); |
3896 } | 3935 } |
3897 | 3936 |
3898 virtual Representation RequiredInputRepresentation(int index) { | 3937 virtual Representation RequiredInputRepresentation(int index) { |
(...skipping 334 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4233 | 4272 |
4234 DECLARE_CONCRETE_INSTRUCTION(In) | 4273 DECLARE_CONCRETE_INSTRUCTION(In) |
4235 }; | 4274 }; |
4236 | 4275 |
4237 #undef DECLARE_INSTRUCTION | 4276 #undef DECLARE_INSTRUCTION |
4238 #undef DECLARE_CONCRETE_INSTRUCTION | 4277 #undef DECLARE_CONCRETE_INSTRUCTION |
4239 | 4278 |
4240 } } // namespace v8::internal | 4279 } } // namespace v8::internal |
4241 | 4280 |
4242 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 4281 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |