| 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 4149 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4160 | 4160 |
| 4161 private: | 4161 private: |
| 4162 int literal_index_; | 4162 int literal_index_; |
| 4163 int depth_; | 4163 int depth_; |
| 4164 }; | 4164 }; |
| 4165 | 4165 |
| 4166 | 4166 |
| 4167 class HArrayLiteral: public HMaterializedLiteral<1> { | 4167 class HArrayLiteral: public HMaterializedLiteral<1> { |
| 4168 public: | 4168 public: |
| 4169 HArrayLiteral(HValue* context, | 4169 HArrayLiteral(HValue* context, |
| 4170 Handle<FixedArray> constant_elements, | 4170 Handle<JSObject> boilerplate_object, |
| 4171 int length, | 4171 int length, |
| 4172 int literal_index, | 4172 int literal_index, |
| 4173 int depth) | 4173 int depth) |
| 4174 : HMaterializedLiteral<1>(literal_index, depth), | 4174 : HMaterializedLiteral<1>(literal_index, depth), |
| 4175 length_(length), | 4175 length_(length), |
| 4176 constant_elements_(constant_elements) { | 4176 boilerplate_object_(boilerplate_object) { |
| 4177 SetOperandAt(0, context); | 4177 SetOperandAt(0, context); |
| 4178 } | 4178 } |
| 4179 | 4179 |
| 4180 HValue* context() { return OperandAt(0); } | 4180 HValue* context() { return OperandAt(0); } |
| 4181 Handle<FixedArray> constant_elements() const { return constant_elements_; } | 4181 ElementsKind boilerplate_elements_kind() const { |
| 4182 return boilerplate_object_->GetElementsKind(); |
| 4183 } |
| 4184 Handle<JSObject> boilerplate_object() const { return boilerplate_object_; } |
| 4182 int length() const { return length_; } | 4185 int length() const { return length_; } |
| 4183 | 4186 |
| 4184 bool IsCopyOnWrite() const; | 4187 bool IsCopyOnWrite() const; |
| 4185 | 4188 |
| 4186 virtual Representation RequiredInputRepresentation(int index) { | 4189 virtual Representation RequiredInputRepresentation(int index) { |
| 4187 return Representation::Tagged(); | 4190 return Representation::Tagged(); |
| 4188 } | 4191 } |
| 4189 virtual HType CalculateInferredType(); | 4192 virtual HType CalculateInferredType(); |
| 4190 | 4193 |
| 4191 DECLARE_CONCRETE_INSTRUCTION(ArrayLiteral) | 4194 DECLARE_CONCRETE_INSTRUCTION(ArrayLiteral) |
| 4192 | 4195 |
| 4193 private: | 4196 private: |
| 4194 int length_; | 4197 int length_; |
| 4195 Handle<FixedArray> constant_elements_; | 4198 Handle<JSObject> boilerplate_object_; |
| 4196 }; | 4199 }; |
| 4197 | 4200 |
| 4198 | 4201 |
| 4199 class HObjectLiteralFast: public HMaterializedLiteral<1> { | 4202 class HObjectLiteralFast: public HMaterializedLiteral<1> { |
| 4200 public: | 4203 public: |
| 4201 HObjectLiteralFast(HValue* context, | 4204 HObjectLiteralFast(HValue* context, |
| 4202 Handle<JSObject> boilerplate, | 4205 Handle<JSObject> boilerplate, |
| 4203 int total_size, | 4206 int total_size, |
| 4204 int literal_index, | 4207 int literal_index, |
| 4205 int depth) | 4208 int depth) |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4426 | 4429 |
| 4427 DECLARE_CONCRETE_INSTRUCTION(In) | 4430 DECLARE_CONCRETE_INSTRUCTION(In) |
| 4428 }; | 4431 }; |
| 4429 | 4432 |
| 4430 #undef DECLARE_INSTRUCTION | 4433 #undef DECLARE_INSTRUCTION |
| 4431 #undef DECLARE_CONCRETE_INSTRUCTION | 4434 #undef DECLARE_CONCRETE_INSTRUCTION |
| 4432 | 4435 |
| 4433 } } // namespace v8::internal | 4436 } } // namespace v8::internal |
| 4434 | 4437 |
| 4435 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 4438 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |