OLD | NEW |
---|---|
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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 3928 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
3939 virtual Representation RequiredInputRepresentation(int index) { | 3939 virtual Representation RequiredInputRepresentation(int index) { |
3940 return Representation::Tagged(); | 3940 return Representation::Tagged(); |
3941 } | 3941 } |
3942 | 3942 |
3943 DECLARE_CONCRETE_INSTRUCTION(LoadFunctionPrototype) | 3943 DECLARE_CONCRETE_INSTRUCTION(LoadFunctionPrototype) |
3944 | 3944 |
3945 protected: | 3945 protected: |
3946 virtual bool DataEquals(HValue* other) { return true; } | 3946 virtual bool DataEquals(HValue* other) { return true; } |
3947 }; | 3947 }; |
3948 | 3948 |
3949 class ArrayInstructionInterface { | |
3950 public: | |
3951 virtual HValue* GetKey() = 0; | |
3952 virtual void SetKey(HValue* key) = 0; | |
3953 virtual void SetIndexOffset(uint32_t index_offset) = 0; | |
3954 virtual bool IsDehoisted() = 0; | |
3955 virtual void SetDehoisted(bool is_dehoisted) = 0; | |
3956 virtual ~ArrayInstructionInterface() { }; | |
3957 }; | |
3949 | 3958 |
3950 class HLoadKeyedFastElement: public HTemplateInstruction<2> { | 3959 class HLoadKeyedFastElement |
3960 : public HTemplateInstruction<2>, public ArrayInstructionInterface { | |
3951 public: | 3961 public: |
3952 enum HoleCheckMode { PERFORM_HOLE_CHECK, OMIT_HOLE_CHECK }; | 3962 enum HoleCheckMode { PERFORM_HOLE_CHECK, OMIT_HOLE_CHECK }; |
3953 | 3963 |
3954 HLoadKeyedFastElement(HValue* obj, | 3964 HLoadKeyedFastElement(HValue* obj, |
3955 HValue* key, | 3965 HValue* key, |
3956 HoleCheckMode hole_check_mode = PERFORM_HOLE_CHECK) | 3966 HoleCheckMode hole_check_mode = PERFORM_HOLE_CHECK) |
3957 : hole_check_mode_(hole_check_mode) { | 3967 : hole_check_mode_(hole_check_mode), index_offset_(0) { |
Jakob Kummerow
2012/05/15 15:53:23
how about ", is_dehoisted_(false)"?
| |
3958 SetOperandAt(0, obj); | 3968 SetOperandAt(0, obj); |
3959 SetOperandAt(1, key); | 3969 SetOperandAt(1, key); |
3960 set_representation(Representation::Tagged()); | 3970 set_representation(Representation::Tagged()); |
3961 SetGVNFlag(kDependsOnArrayElements); | 3971 SetGVNFlag(kDependsOnArrayElements); |
3962 SetFlag(kUseGVN); | 3972 SetFlag(kUseGVN); |
3963 } | 3973 } |
3964 | 3974 |
3965 HValue* object() { return OperandAt(0); } | 3975 HValue* object() { return OperandAt(0); } |
3966 HValue* key() { return OperandAt(1); } | 3976 HValue* key() { return OperandAt(1); } |
3977 uint32_t index_offset() { return index_offset_; } | |
3978 void SetIndexOffset(uint32_t index_offset) { index_offset_ = index_offset; } | |
3979 HValue* GetKey() { return key(); } | |
3980 void SetKey(HValue* key) { SetOperandAt(1, key); } | |
3981 bool IsDehoisted() { return is_dehoisted_; } | |
3982 void SetDehoisted(bool is_dehoisted) { is_dehoisted_ = is_dehoisted; } | |
3967 | 3983 |
3968 virtual Representation RequiredInputRepresentation(int index) { | 3984 virtual Representation RequiredInputRepresentation(int index) { |
3969 // The key is supposed to be Integer32. | 3985 // The key is supposed to be Integer32. |
3970 return index == 0 | 3986 return index == 0 |
3971 ? Representation::Tagged() | 3987 ? Representation::Tagged() |
3972 : Representation::Integer32(); | 3988 : Representation::Integer32(); |
3973 } | 3989 } |
3974 | 3990 |
3975 virtual void PrintDataTo(StringStream* stream); | 3991 virtual void PrintDataTo(StringStream* stream); |
3976 | 3992 |
3977 bool RequiresHoleCheck(); | 3993 bool RequiresHoleCheck(); |
3978 | 3994 |
3979 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastElement) | 3995 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastElement) |
3980 | 3996 |
3981 protected: | 3997 protected: |
3982 virtual bool DataEquals(HValue* other) { | 3998 virtual bool DataEquals(HValue* other) { |
3983 if (!other->IsLoadKeyedFastElement()) return false; | 3999 if (!other->IsLoadKeyedFastElement()) return false; |
3984 HLoadKeyedFastElement* other_load = HLoadKeyedFastElement::cast(other); | 4000 HLoadKeyedFastElement* other_load = HLoadKeyedFastElement::cast(other); |
3985 return hole_check_mode_ == other_load->hole_check_mode_; | 4001 return hole_check_mode_ == other_load->hole_check_mode_; |
Jakob Kummerow
2012/05/15 15:53:23
I think you need to add a comparison of index_offs
| |
3986 } | 4002 } |
3987 | 4003 |
3988 private: | 4004 private: |
3989 HoleCheckMode hole_check_mode_; | 4005 HoleCheckMode hole_check_mode_; |
4006 uint32_t index_offset_; | |
4007 bool is_dehoisted_; | |
3990 }; | 4008 }; |
3991 | 4009 |
3992 | 4010 |
3993 class HLoadKeyedFastDoubleElement: public HTemplateInstruction<2> { | 4011 class HLoadKeyedFastDoubleElement |
4012 : public HTemplateInstruction<2>, public ArrayInstructionInterface { | |
3994 public: | 4013 public: |
3995 HLoadKeyedFastDoubleElement(HValue* elements, HValue* key) { | 4014 HLoadKeyedFastDoubleElement(HValue* elements, HValue* key) |
4015 : index_offset_(0) { | |
3996 SetOperandAt(0, elements); | 4016 SetOperandAt(0, elements); |
3997 SetOperandAt(1, key); | 4017 SetOperandAt(1, key); |
3998 set_representation(Representation::Double()); | 4018 set_representation(Representation::Double()); |
3999 SetGVNFlag(kDependsOnDoubleArrayElements); | 4019 SetGVNFlag(kDependsOnDoubleArrayElements); |
4000 SetFlag(kUseGVN); | 4020 SetFlag(kUseGVN); |
4001 } | 4021 } |
4002 | 4022 |
4003 HValue* elements() { return OperandAt(0); } | 4023 HValue* elements() { return OperandAt(0); } |
4004 HValue* key() { return OperandAt(1); } | 4024 HValue* key() { return OperandAt(1); } |
4025 uint32_t index_offset() { return index_offset_; } | |
4026 void SetIndexOffset(uint32_t index_offset) { index_offset_ = index_offset; } | |
4027 HValue* GetKey() { return key(); } | |
4028 void SetKey(HValue* key) { SetOperandAt(1, key); } | |
4029 bool IsDehoisted() { return is_dehoisted_; } | |
4030 void SetDehoisted(bool is_dehoisted) { is_dehoisted_ = is_dehoisted; } | |
4005 | 4031 |
4006 virtual Representation RequiredInputRepresentation(int index) { | 4032 virtual Representation RequiredInputRepresentation(int index) { |
4007 // The key is supposed to be Integer32. | 4033 // The key is supposed to be Integer32. |
4008 return index == 0 | 4034 return index == 0 |
4009 ? Representation::Tagged() | 4035 ? Representation::Tagged() |
4010 : Representation::Integer32(); | 4036 : Representation::Integer32(); |
4011 } | 4037 } |
4012 | 4038 |
4013 virtual void PrintDataTo(StringStream* stream); | 4039 virtual void PrintDataTo(StringStream* stream); |
4014 | 4040 |
4015 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastDoubleElement) | 4041 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastDoubleElement) |
4016 | 4042 |
4017 protected: | 4043 protected: |
4018 virtual bool DataEquals(HValue* other) { return true; } | 4044 virtual bool DataEquals(HValue* other) { return true; } |
4045 | |
4046 private: | |
4047 uint32_t index_offset_; | |
4048 bool is_dehoisted_; | |
4019 }; | 4049 }; |
4020 | 4050 |
4021 | 4051 |
4022 class HLoadKeyedSpecializedArrayElement: public HTemplateInstruction<2> { | 4052 class HLoadKeyedSpecializedArrayElement |
4053 : public HTemplateInstruction<2>, public ArrayInstructionInterface { | |
4023 public: | 4054 public: |
4024 HLoadKeyedSpecializedArrayElement(HValue* external_elements, | 4055 HLoadKeyedSpecializedArrayElement(HValue* external_elements, |
4025 HValue* key, | 4056 HValue* key, |
4026 ElementsKind elements_kind) | 4057 ElementsKind elements_kind) |
4027 : elements_kind_(elements_kind) { | 4058 : elements_kind_(elements_kind), index_offset_(0) { |
4028 SetOperandAt(0, external_elements); | 4059 SetOperandAt(0, external_elements); |
4029 SetOperandAt(1, key); | 4060 SetOperandAt(1, key); |
4030 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS || | 4061 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS || |
4031 elements_kind == EXTERNAL_DOUBLE_ELEMENTS) { | 4062 elements_kind == EXTERNAL_DOUBLE_ELEMENTS) { |
4032 set_representation(Representation::Double()); | 4063 set_representation(Representation::Double()); |
4033 } else { | 4064 } else { |
4034 set_representation(Representation::Integer32()); | 4065 set_representation(Representation::Integer32()); |
4035 } | 4066 } |
4036 SetGVNFlag(kDependsOnSpecializedArrayElements); | 4067 SetGVNFlag(kDependsOnSpecializedArrayElements); |
4037 // Native code could change the specialized array. | 4068 // Native code could change the specialized array. |
4038 SetGVNFlag(kDependsOnCalls); | 4069 SetGVNFlag(kDependsOnCalls); |
4039 SetFlag(kUseGVN); | 4070 SetFlag(kUseGVN); |
4040 } | 4071 } |
4041 | 4072 |
4042 virtual void PrintDataTo(StringStream* stream); | 4073 virtual void PrintDataTo(StringStream* stream); |
4043 | 4074 |
4044 virtual Representation RequiredInputRepresentation(int index) { | 4075 virtual Representation RequiredInputRepresentation(int index) { |
4045 // The key is supposed to be Integer32, but the base pointer | 4076 // The key is supposed to be Integer32, but the base pointer |
4046 // for the element load is a naked pointer. | 4077 // for the element load is a naked pointer. |
4047 return index == 0 | 4078 return index == 0 |
4048 ? Representation::External() | 4079 ? Representation::External() |
4049 : Representation::Integer32(); | 4080 : Representation::Integer32(); |
4050 } | 4081 } |
4051 | 4082 |
4052 HValue* external_pointer() { return OperandAt(0); } | 4083 HValue* external_pointer() { return OperandAt(0); } |
4053 HValue* key() { return OperandAt(1); } | 4084 HValue* key() { return OperandAt(1); } |
4054 ElementsKind elements_kind() const { return elements_kind_; } | 4085 ElementsKind elements_kind() const { return elements_kind_; } |
4086 uint32_t index_offset() { return index_offset_; } | |
4087 void SetIndexOffset(uint32_t index_offset) { index_offset_ = index_offset; } | |
4088 HValue* GetKey() { return key(); } | |
4089 void SetKey(HValue* key) { SetOperandAt(1, key); } | |
4090 bool IsDehoisted() { return is_dehoisted_; } | |
4091 void SetDehoisted(bool is_dehoisted) { is_dehoisted_ = is_dehoisted; } | |
4055 | 4092 |
4056 virtual Range* InferRange(Zone* zone); | 4093 virtual Range* InferRange(Zone* zone); |
4057 | 4094 |
4058 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedSpecializedArrayElement) | 4095 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedSpecializedArrayElement) |
4059 | 4096 |
4060 protected: | 4097 protected: |
4061 virtual bool DataEquals(HValue* other) { | 4098 virtual bool DataEquals(HValue* other) { |
4062 if (!other->IsLoadKeyedSpecializedArrayElement()) return false; | 4099 if (!other->IsLoadKeyedSpecializedArrayElement()) return false; |
4063 HLoadKeyedSpecializedArrayElement* cast_other = | 4100 HLoadKeyedSpecializedArrayElement* cast_other = |
4064 HLoadKeyedSpecializedArrayElement::cast(other); | 4101 HLoadKeyedSpecializedArrayElement::cast(other); |
4065 return elements_kind_ == cast_other->elements_kind(); | 4102 return elements_kind_ == cast_other->elements_kind(); |
4066 } | 4103 } |
4067 | 4104 |
4068 private: | 4105 private: |
4069 ElementsKind elements_kind_; | 4106 ElementsKind elements_kind_; |
4107 uint32_t index_offset_; | |
4108 bool is_dehoisted_; | |
4070 }; | 4109 }; |
4071 | 4110 |
4072 | 4111 |
4073 class HLoadKeyedGeneric: public HTemplateInstruction<3> { | 4112 class HLoadKeyedGeneric: public HTemplateInstruction<3> { |
4074 public: | 4113 public: |
4075 HLoadKeyedGeneric(HValue* context, HValue* obj, HValue* key) { | 4114 HLoadKeyedGeneric(HValue* context, HValue* obj, HValue* key) { |
4076 set_representation(Representation::Tagged()); | 4115 set_representation(Representation::Tagged()); |
4077 SetOperandAt(0, obj); | 4116 SetOperandAt(0, obj); |
4078 SetOperandAt(1, key); | 4117 SetOperandAt(1, key); |
4079 SetOperandAt(2, context); | 4118 SetOperandAt(2, context); |
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4181 } | 4220 } |
4182 | 4221 |
4183 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric) | 4222 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric) |
4184 | 4223 |
4185 private: | 4224 private: |
4186 Handle<String> name_; | 4225 Handle<String> name_; |
4187 StrictModeFlag strict_mode_flag_; | 4226 StrictModeFlag strict_mode_flag_; |
4188 }; | 4227 }; |
4189 | 4228 |
4190 | 4229 |
4191 class HStoreKeyedFastElement: public HTemplateInstruction<3> { | 4230 class HStoreKeyedFastElement |
4231 : public HTemplateInstruction<3>, public ArrayInstructionInterface { | |
4192 public: | 4232 public: |
4193 HStoreKeyedFastElement(HValue* obj, HValue* key, HValue* val, | 4233 HStoreKeyedFastElement(HValue* obj, HValue* key, HValue* val, |
4194 ElementsKind elements_kind = FAST_ELEMENTS) | 4234 ElementsKind elements_kind = FAST_ELEMENTS) |
4195 : elements_kind_(elements_kind) { | 4235 : elements_kind_(elements_kind), index_offset_(0) { |
4196 SetOperandAt(0, obj); | 4236 SetOperandAt(0, obj); |
4197 SetOperandAt(1, key); | 4237 SetOperandAt(1, key); |
4198 SetOperandAt(2, val); | 4238 SetOperandAt(2, val); |
4199 SetGVNFlag(kChangesArrayElements); | 4239 SetGVNFlag(kChangesArrayElements); |
4200 } | 4240 } |
4201 | 4241 |
4202 virtual Representation RequiredInputRepresentation(int index) { | 4242 virtual Representation RequiredInputRepresentation(int index) { |
4203 // The key is supposed to be Integer32. | 4243 // The key is supposed to be Integer32. |
4204 return index == 1 | 4244 return index == 1 |
4205 ? Representation::Integer32() | 4245 ? Representation::Integer32() |
4206 : Representation::Tagged(); | 4246 : Representation::Tagged(); |
4207 } | 4247 } |
4208 | 4248 |
4209 HValue* object() { return OperandAt(0); } | 4249 HValue* object() { return OperandAt(0); } |
4210 HValue* key() { return OperandAt(1); } | 4250 HValue* key() { return OperandAt(1); } |
4211 HValue* value() { return OperandAt(2); } | 4251 HValue* value() { return OperandAt(2); } |
4212 bool value_is_smi() { | 4252 bool value_is_smi() { |
4213 return elements_kind_ == FAST_SMI_ONLY_ELEMENTS; | 4253 return elements_kind_ == FAST_SMI_ONLY_ELEMENTS; |
4214 } | 4254 } |
4255 uint32_t index_offset() { return index_offset_; } | |
4256 void SetIndexOffset(uint32_t index_offset) { index_offset_ = index_offset; } | |
4257 HValue* GetKey() { return key(); } | |
4258 void SetKey(HValue* key) { SetOperandAt(1, key); } | |
4259 bool IsDehoisted() { return is_dehoisted_; } | |
4260 void SetDehoisted(bool is_dehoisted) { is_dehoisted_ = is_dehoisted; } | |
4215 | 4261 |
4216 bool NeedsWriteBarrier() { | 4262 bool NeedsWriteBarrier() { |
4217 if (value_is_smi()) { | 4263 if (value_is_smi()) { |
4218 return false; | 4264 return false; |
4219 } else { | 4265 } else { |
4220 return StoringValueNeedsWriteBarrier(value()); | 4266 return StoringValueNeedsWriteBarrier(value()); |
4221 } | 4267 } |
4222 } | 4268 } |
4223 | 4269 |
4224 virtual void PrintDataTo(StringStream* stream); | 4270 virtual void PrintDataTo(StringStream* stream); |
4225 | 4271 |
4226 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement) | 4272 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement) |
4227 | 4273 |
4228 private: | 4274 private: |
4229 ElementsKind elements_kind_; | 4275 ElementsKind elements_kind_; |
4276 uint32_t index_offset_; | |
4277 bool is_dehoisted_; | |
4230 }; | 4278 }; |
4231 | 4279 |
4232 | 4280 |
4233 class HStoreKeyedFastDoubleElement: public HTemplateInstruction<3> { | 4281 class HStoreKeyedFastDoubleElement |
4282 : public HTemplateInstruction<3>, public ArrayInstructionInterface { | |
4234 public: | 4283 public: |
4235 HStoreKeyedFastDoubleElement(HValue* elements, | 4284 HStoreKeyedFastDoubleElement(HValue* elements, |
4236 HValue* key, | 4285 HValue* key, |
4237 HValue* val) { | 4286 HValue* val) : index_offset_(0) { |
4238 SetOperandAt(0, elements); | 4287 SetOperandAt(0, elements); |
4239 SetOperandAt(1, key); | 4288 SetOperandAt(1, key); |
4240 SetOperandAt(2, val); | 4289 SetOperandAt(2, val); |
4241 SetGVNFlag(kChangesDoubleArrayElements); | 4290 SetGVNFlag(kChangesDoubleArrayElements); |
4242 } | 4291 } |
4243 | 4292 |
4244 virtual Representation RequiredInputRepresentation(int index) { | 4293 virtual Representation RequiredInputRepresentation(int index) { |
4245 if (index == 1) { | 4294 if (index == 1) { |
4246 return Representation::Integer32(); | 4295 return Representation::Integer32(); |
4247 } else if (index == 2) { | 4296 } else if (index == 2) { |
4248 return Representation::Double(); | 4297 return Representation::Double(); |
4249 } else { | 4298 } else { |
4250 return Representation::Tagged(); | 4299 return Representation::Tagged(); |
4251 } | 4300 } |
4252 } | 4301 } |
4253 | 4302 |
4254 HValue* elements() { return OperandAt(0); } | 4303 HValue* elements() { return OperandAt(0); } |
4255 HValue* key() { return OperandAt(1); } | 4304 HValue* key() { return OperandAt(1); } |
4256 HValue* value() { return OperandAt(2); } | 4305 HValue* value() { return OperandAt(2); } |
4306 uint32_t index_offset() { return index_offset_; } | |
4307 void SetIndexOffset(uint32_t index_offset) { index_offset_ = index_offset; } | |
4308 HValue* GetKey() { return key(); } | |
4309 void SetKey(HValue* key) { SetOperandAt(1, key); } | |
4310 bool IsDehoisted() { return is_dehoisted_; } | |
4311 void SetDehoisted(bool is_dehoisted) { is_dehoisted_ = is_dehoisted; } | |
4257 | 4312 |
4258 bool NeedsWriteBarrier() { | 4313 bool NeedsWriteBarrier() { |
4259 return StoringValueNeedsWriteBarrier(value()); | 4314 return StoringValueNeedsWriteBarrier(value()); |
4260 } | 4315 } |
4261 | 4316 |
4262 bool NeedsCanonicalization(); | 4317 bool NeedsCanonicalization(); |
4263 | 4318 |
4264 virtual void PrintDataTo(StringStream* stream); | 4319 virtual void PrintDataTo(StringStream* stream); |
4265 | 4320 |
4266 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastDoubleElement) | 4321 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastDoubleElement) |
4322 | |
4323 private: | |
4324 uint32_t index_offset_; | |
4325 bool is_dehoisted_; | |
4267 }; | 4326 }; |
4268 | 4327 |
4269 | 4328 |
4270 class HStoreKeyedSpecializedArrayElement: public HTemplateInstruction<3> { | 4329 class HStoreKeyedSpecializedArrayElement |
4330 : public HTemplateInstruction<3>, public ArrayInstructionInterface { | |
4271 public: | 4331 public: |
4272 HStoreKeyedSpecializedArrayElement(HValue* external_elements, | 4332 HStoreKeyedSpecializedArrayElement(HValue* external_elements, |
4273 HValue* key, | 4333 HValue* key, |
4274 HValue* val, | 4334 HValue* val, |
4275 ElementsKind elements_kind) | 4335 ElementsKind elements_kind) |
4276 : elements_kind_(elements_kind) { | 4336 : elements_kind_(elements_kind), index_offset_(0) { |
4277 SetGVNFlag(kChangesSpecializedArrayElements); | 4337 SetGVNFlag(kChangesSpecializedArrayElements); |
4278 SetOperandAt(0, external_elements); | 4338 SetOperandAt(0, external_elements); |
4279 SetOperandAt(1, key); | 4339 SetOperandAt(1, key); |
4280 SetOperandAt(2, val); | 4340 SetOperandAt(2, val); |
4281 } | 4341 } |
4282 | 4342 |
4283 virtual void PrintDataTo(StringStream* stream); | 4343 virtual void PrintDataTo(StringStream* stream); |
4284 | 4344 |
4285 virtual Representation RequiredInputRepresentation(int index) { | 4345 virtual Representation RequiredInputRepresentation(int index) { |
4286 if (index == 0) { | 4346 if (index == 0) { |
4287 return Representation::External(); | 4347 return Representation::External(); |
4288 } else { | 4348 } else { |
4289 bool float_or_double_elements = | 4349 bool float_or_double_elements = |
4290 elements_kind() == EXTERNAL_FLOAT_ELEMENTS || | 4350 elements_kind() == EXTERNAL_FLOAT_ELEMENTS || |
4291 elements_kind() == EXTERNAL_DOUBLE_ELEMENTS; | 4351 elements_kind() == EXTERNAL_DOUBLE_ELEMENTS; |
4292 if (index == 2 && float_or_double_elements) { | 4352 if (index == 2 && float_or_double_elements) { |
4293 return Representation::Double(); | 4353 return Representation::Double(); |
4294 } else { | 4354 } else { |
4295 return Representation::Integer32(); | 4355 return Representation::Integer32(); |
4296 } | 4356 } |
4297 } | 4357 } |
4298 } | 4358 } |
4299 | 4359 |
4300 HValue* external_pointer() { return OperandAt(0); } | 4360 HValue* external_pointer() { return OperandAt(0); } |
4301 HValue* key() { return OperandAt(1); } | 4361 HValue* key() { return OperandAt(1); } |
4302 HValue* value() { return OperandAt(2); } | 4362 HValue* value() { return OperandAt(2); } |
4303 ElementsKind elements_kind() const { return elements_kind_; } | 4363 ElementsKind elements_kind() const { return elements_kind_; } |
4364 uint32_t index_offset() { return index_offset_; } | |
4365 void SetIndexOffset(uint32_t index_offset) { index_offset_ = index_offset; } | |
4366 HValue* GetKey() { return key(); } | |
4367 void SetKey(HValue* key) { SetOperandAt(1, key); } | |
4368 bool IsDehoisted() { return is_dehoisted_; } | |
4369 void SetDehoisted(bool is_dehoisted) { is_dehoisted_ = is_dehoisted; } | |
4304 | 4370 |
4305 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedSpecializedArrayElement) | 4371 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedSpecializedArrayElement) |
4306 | 4372 |
4307 private: | 4373 private: |
4308 ElementsKind elements_kind_; | 4374 ElementsKind elements_kind_; |
4375 uint32_t index_offset_; | |
4376 bool is_dehoisted_; | |
4309 }; | 4377 }; |
4310 | 4378 |
4311 | 4379 |
4312 class HStoreKeyedGeneric: public HTemplateInstruction<4> { | 4380 class HStoreKeyedGeneric: public HTemplateInstruction<4> { |
4313 public: | 4381 public: |
4314 HStoreKeyedGeneric(HValue* context, | 4382 HStoreKeyedGeneric(HValue* context, |
4315 HValue* object, | 4383 HValue* object, |
4316 HValue* key, | 4384 HValue* key, |
4317 HValue* value, | 4385 HValue* value, |
4318 StrictModeFlag strict_mode_flag) | 4386 StrictModeFlag strict_mode_flag) |
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
4959 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); | 5027 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); |
4960 }; | 5028 }; |
4961 | 5029 |
4962 | 5030 |
4963 #undef DECLARE_INSTRUCTION | 5031 #undef DECLARE_INSTRUCTION |
4964 #undef DECLARE_CONCRETE_INSTRUCTION | 5032 #undef DECLARE_CONCRETE_INSTRUCTION |
4965 | 5033 |
4966 } } // namespace v8::internal | 5034 } } // namespace v8::internal |
4967 | 5035 |
4968 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 5036 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |