| 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 4138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4149 | 4149 |
| 4150 private: | 4150 private: |
| 4151 int literal_index_; | 4151 int literal_index_; |
| 4152 int depth_; | 4152 int depth_; |
| 4153 }; | 4153 }; |
| 4154 | 4154 |
| 4155 | 4155 |
| 4156 class HArrayLiteral: public HMaterializedLiteral<1> { | 4156 class HArrayLiteral: public HMaterializedLiteral<1> { |
| 4157 public: | 4157 public: |
| 4158 HArrayLiteral(HValue* context, | 4158 HArrayLiteral(HValue* context, |
| 4159 Handle<FixedArray> constant_elements, | 4159 Handle<JSObject> boilerplate_object, |
| 4160 int length, | 4160 int length, |
| 4161 int literal_index, | 4161 int literal_index, |
| 4162 int depth) | 4162 int depth) |
| 4163 : HMaterializedLiteral<1>(literal_index, depth), | 4163 : HMaterializedLiteral<1>(literal_index, depth), |
| 4164 length_(length), | 4164 length_(length), |
| 4165 constant_elements_(constant_elements) { | 4165 boilerplate_object_(boilerplate_object) { |
| 4166 SetOperandAt(0, context); | 4166 SetOperandAt(0, context); |
| 4167 } | 4167 } |
| 4168 | 4168 |
| 4169 HValue* context() { return OperandAt(0); } | 4169 HValue* context() { return OperandAt(0); } |
| 4170 Handle<FixedArray> constant_elements() const { return constant_elements_; } | 4170 ElementsKind boilerplate_elements_kind() const { |
| 4171 return boilerplate_object_->GetElementsKind(); |
| 4172 } |
| 4173 Handle<JSObject> boilerplate_object() const { return boilerplate_object_; } |
| 4171 int length() const { return length_; } | 4174 int length() const { return length_; } |
| 4172 | 4175 |
| 4173 bool IsCopyOnWrite() const; | 4176 bool IsCopyOnWrite() const; |
| 4174 | 4177 |
| 4175 virtual Representation RequiredInputRepresentation(int index) { | 4178 virtual Representation RequiredInputRepresentation(int index) { |
| 4176 return Representation::Tagged(); | 4179 return Representation::Tagged(); |
| 4177 } | 4180 } |
| 4178 virtual HType CalculateInferredType(); | 4181 virtual HType CalculateInferredType(); |
| 4179 | 4182 |
| 4180 DECLARE_CONCRETE_INSTRUCTION(ArrayLiteral) | 4183 DECLARE_CONCRETE_INSTRUCTION(ArrayLiteral) |
| 4181 | 4184 |
| 4182 private: | 4185 private: |
| 4183 int length_; | 4186 int length_; |
| 4184 Handle<FixedArray> constant_elements_; | 4187 Handle<JSObject> boilerplate_object_; |
| 4185 }; | 4188 }; |
| 4186 | 4189 |
| 4187 | 4190 |
| 4188 class HObjectLiteralFast: public HMaterializedLiteral<1> { | 4191 class HObjectLiteralFast: public HMaterializedLiteral<1> { |
| 4189 public: | 4192 public: |
| 4190 HObjectLiteralFast(HValue* context, | 4193 HObjectLiteralFast(HValue* context, |
| 4191 Handle<JSObject> boilerplate, | 4194 Handle<JSObject> boilerplate, |
| 4192 int total_size, | 4195 int total_size, |
| 4193 int literal_index, | 4196 int literal_index, |
| 4194 int depth) | 4197 int depth) |
| (...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4415 | 4418 |
| 4416 DECLARE_CONCRETE_INSTRUCTION(In) | 4419 DECLARE_CONCRETE_INSTRUCTION(In) |
| 4417 }; | 4420 }; |
| 4418 | 4421 |
| 4419 #undef DECLARE_INSTRUCTION | 4422 #undef DECLARE_INSTRUCTION |
| 4420 #undef DECLARE_CONCRETE_INSTRUCTION | 4423 #undef DECLARE_CONCRETE_INSTRUCTION |
| 4421 | 4424 |
| 4422 } } // namespace v8::internal | 4425 } } // namespace v8::internal |
| 4423 | 4426 |
| 4424 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 4427 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |