Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(319)

Side by Side Diff: src/hydrogen-instructions.h

Issue 10382055: Array index computation dehoisting. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed review comments. Created 8 years, 7 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/lithium-codegen-ia32.h » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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
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),
3968 index_offset_(0),
3969 is_dehoisted_(false) {
3958 SetOperandAt(0, obj); 3970 SetOperandAt(0, obj);
3959 SetOperandAt(1, key); 3971 SetOperandAt(1, key);
3960 set_representation(Representation::Tagged()); 3972 set_representation(Representation::Tagged());
3961 SetGVNFlag(kDependsOnArrayElements); 3973 SetGVNFlag(kDependsOnArrayElements);
3962 SetFlag(kUseGVN); 3974 SetFlag(kUseGVN);
3963 } 3975 }
3964 3976
3965 HValue* object() { return OperandAt(0); } 3977 HValue* object() { return OperandAt(0); }
3966 HValue* key() { return OperandAt(1); } 3978 HValue* key() { return OperandAt(1); }
3979 uint32_t index_offset() { return index_offset_; }
3980 void SetIndexOffset(uint32_t index_offset) { index_offset_ = index_offset; }
3981 HValue* GetKey() { return key(); }
3982 void SetKey(HValue* key) { SetOperandAt(1, key); }
3983 bool IsDehoisted() { return is_dehoisted_; }
3984 void SetDehoisted(bool is_dehoisted) { is_dehoisted_ = is_dehoisted; }
3967 3985
3968 virtual Representation RequiredInputRepresentation(int index) { 3986 virtual Representation RequiredInputRepresentation(int index) {
3969 // The key is supposed to be Integer32. 3987 // The key is supposed to be Integer32.
3970 return index == 0 3988 return index == 0
3971 ? Representation::Tagged() 3989 ? Representation::Tagged()
3972 : Representation::Integer32(); 3990 : Representation::Integer32();
3973 } 3991 }
3974 3992
3975 virtual void PrintDataTo(StringStream* stream); 3993 virtual void PrintDataTo(StringStream* stream);
3976 3994
3977 bool RequiresHoleCheck(); 3995 bool RequiresHoleCheck();
3978 3996
3979 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastElement) 3997 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastElement)
3980 3998
3981 protected: 3999 protected:
3982 virtual bool DataEquals(HValue* other) { 4000 virtual bool DataEquals(HValue* other) {
3983 if (!other->IsLoadKeyedFastElement()) return false; 4001 if (!other->IsLoadKeyedFastElement()) return false;
3984 HLoadKeyedFastElement* other_load = HLoadKeyedFastElement::cast(other); 4002 HLoadKeyedFastElement* other_load = HLoadKeyedFastElement::cast(other);
4003 if (is_dehoisted_ && index_offset_ != other_load->index_offset_)
4004 return false;
3985 return hole_check_mode_ == other_load->hole_check_mode_; 4005 return hole_check_mode_ == other_load->hole_check_mode_;
3986 } 4006 }
3987 4007
3988 private: 4008 private:
3989 HoleCheckMode hole_check_mode_; 4009 HoleCheckMode hole_check_mode_;
4010 uint32_t index_offset_;
4011 bool is_dehoisted_;
3990 }; 4012 };
3991 4013
3992 4014
3993 class HLoadKeyedFastDoubleElement: public HTemplateInstruction<2> { 4015 class HLoadKeyedFastDoubleElement
4016 : public HTemplateInstruction<2>, public ArrayInstructionInterface {
3994 public: 4017 public:
3995 HLoadKeyedFastDoubleElement(HValue* elements, HValue* key) { 4018 HLoadKeyedFastDoubleElement(HValue* elements, HValue* key)
4019 : index_offset_(0), is_dehoisted_(false) {
3996 SetOperandAt(0, elements); 4020 SetOperandAt(0, elements);
3997 SetOperandAt(1, key); 4021 SetOperandAt(1, key);
3998 set_representation(Representation::Double()); 4022 set_representation(Representation::Double());
3999 SetGVNFlag(kDependsOnDoubleArrayElements); 4023 SetGVNFlag(kDependsOnDoubleArrayElements);
4000 SetFlag(kUseGVN); 4024 SetFlag(kUseGVN);
4001 } 4025 }
4002 4026
4003 HValue* elements() { return OperandAt(0); } 4027 HValue* elements() { return OperandAt(0); }
4004 HValue* key() { return OperandAt(1); } 4028 HValue* key() { return OperandAt(1); }
4029 uint32_t index_offset() { return index_offset_; }
4030 void SetIndexOffset(uint32_t index_offset) { index_offset_ = index_offset; }
4031 HValue* GetKey() { return key(); }
4032 void SetKey(HValue* key) { SetOperandAt(1, key); }
4033 bool IsDehoisted() { return is_dehoisted_; }
4034 void SetDehoisted(bool is_dehoisted) { is_dehoisted_ = is_dehoisted; }
4005 4035
4006 virtual Representation RequiredInputRepresentation(int index) { 4036 virtual Representation RequiredInputRepresentation(int index) {
4007 // The key is supposed to be Integer32. 4037 // The key is supposed to be Integer32.
4008 return index == 0 4038 return index == 0
4009 ? Representation::Tagged() 4039 ? Representation::Tagged()
4010 : Representation::Integer32(); 4040 : Representation::Integer32();
4011 } 4041 }
4012 4042
4013 virtual void PrintDataTo(StringStream* stream); 4043 virtual void PrintDataTo(StringStream* stream);
4014 4044
4015 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastDoubleElement) 4045 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedFastDoubleElement)
4016 4046
4017 protected: 4047 protected:
4018 virtual bool DataEquals(HValue* other) { return true; } 4048 virtual bool DataEquals(HValue* other) { return true; }
4049
4050 private:
4051 uint32_t index_offset_;
4052 bool is_dehoisted_;
4019 }; 4053 };
4020 4054
4021 4055
4022 class HLoadKeyedSpecializedArrayElement: public HTemplateInstruction<2> { 4056 class HLoadKeyedSpecializedArrayElement
4057 : public HTemplateInstruction<2>, public ArrayInstructionInterface {
4023 public: 4058 public:
4024 HLoadKeyedSpecializedArrayElement(HValue* external_elements, 4059 HLoadKeyedSpecializedArrayElement(HValue* external_elements,
4025 HValue* key, 4060 HValue* key,
4026 ElementsKind elements_kind) 4061 ElementsKind elements_kind)
4027 : elements_kind_(elements_kind) { 4062 : elements_kind_(elements_kind),
4063 index_offset_(0),
4064 is_dehoisted_(false) {
4028 SetOperandAt(0, external_elements); 4065 SetOperandAt(0, external_elements);
4029 SetOperandAt(1, key); 4066 SetOperandAt(1, key);
4030 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS || 4067 if (elements_kind == EXTERNAL_FLOAT_ELEMENTS ||
4031 elements_kind == EXTERNAL_DOUBLE_ELEMENTS) { 4068 elements_kind == EXTERNAL_DOUBLE_ELEMENTS) {
4032 set_representation(Representation::Double()); 4069 set_representation(Representation::Double());
4033 } else { 4070 } else {
4034 set_representation(Representation::Integer32()); 4071 set_representation(Representation::Integer32());
4035 } 4072 }
4036 SetGVNFlag(kDependsOnSpecializedArrayElements); 4073 SetGVNFlag(kDependsOnSpecializedArrayElements);
4037 // Native code could change the specialized array. 4074 // Native code could change the specialized array.
4038 SetGVNFlag(kDependsOnCalls); 4075 SetGVNFlag(kDependsOnCalls);
4039 SetFlag(kUseGVN); 4076 SetFlag(kUseGVN);
4040 } 4077 }
4041 4078
4042 virtual void PrintDataTo(StringStream* stream); 4079 virtual void PrintDataTo(StringStream* stream);
4043 4080
4044 virtual Representation RequiredInputRepresentation(int index) { 4081 virtual Representation RequiredInputRepresentation(int index) {
4045 // The key is supposed to be Integer32, but the base pointer 4082 // The key is supposed to be Integer32, but the base pointer
4046 // for the element load is a naked pointer. 4083 // for the element load is a naked pointer.
4047 return index == 0 4084 return index == 0
4048 ? Representation::External() 4085 ? Representation::External()
4049 : Representation::Integer32(); 4086 : Representation::Integer32();
4050 } 4087 }
4051 4088
4052 HValue* external_pointer() { return OperandAt(0); } 4089 HValue* external_pointer() { return OperandAt(0); }
4053 HValue* key() { return OperandAt(1); } 4090 HValue* key() { return OperandAt(1); }
4054 ElementsKind elements_kind() const { return elements_kind_; } 4091 ElementsKind elements_kind() const { return elements_kind_; }
4092 uint32_t index_offset() { return index_offset_; }
4093 void SetIndexOffset(uint32_t index_offset) { index_offset_ = index_offset; }
4094 HValue* GetKey() { return key(); }
4095 void SetKey(HValue* key) { SetOperandAt(1, key); }
4096 bool IsDehoisted() { return is_dehoisted_; }
4097 void SetDehoisted(bool is_dehoisted) { is_dehoisted_ = is_dehoisted; }
4055 4098
4056 virtual Range* InferRange(Zone* zone); 4099 virtual Range* InferRange(Zone* zone);
4057 4100
4058 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedSpecializedArrayElement) 4101 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedSpecializedArrayElement)
4059 4102
4060 protected: 4103 protected:
4061 virtual bool DataEquals(HValue* other) { 4104 virtual bool DataEquals(HValue* other) {
4062 if (!other->IsLoadKeyedSpecializedArrayElement()) return false; 4105 if (!other->IsLoadKeyedSpecializedArrayElement()) return false;
4063 HLoadKeyedSpecializedArrayElement* cast_other = 4106 HLoadKeyedSpecializedArrayElement* cast_other =
4064 HLoadKeyedSpecializedArrayElement::cast(other); 4107 HLoadKeyedSpecializedArrayElement::cast(other);
4065 return elements_kind_ == cast_other->elements_kind(); 4108 return elements_kind_ == cast_other->elements_kind();
4066 } 4109 }
4067 4110
4068 private: 4111 private:
4069 ElementsKind elements_kind_; 4112 ElementsKind elements_kind_;
4113 uint32_t index_offset_;
4114 bool is_dehoisted_;
4070 }; 4115 };
4071 4116
4072 4117
4073 class HLoadKeyedGeneric: public HTemplateInstruction<3> { 4118 class HLoadKeyedGeneric: public HTemplateInstruction<3> {
4074 public: 4119 public:
4075 HLoadKeyedGeneric(HValue* context, HValue* obj, HValue* key) { 4120 HLoadKeyedGeneric(HValue* context, HValue* obj, HValue* key) {
4076 set_representation(Representation::Tagged()); 4121 set_representation(Representation::Tagged());
4077 SetOperandAt(0, obj); 4122 SetOperandAt(0, obj);
4078 SetOperandAt(1, key); 4123 SetOperandAt(1, key);
4079 SetOperandAt(2, context); 4124 SetOperandAt(2, context);
(...skipping 101 matching lines...) Expand 10 before | Expand all | Expand 10 after
4181 } 4226 }
4182 4227
4183 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric) 4228 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric)
4184 4229
4185 private: 4230 private:
4186 Handle<String> name_; 4231 Handle<String> name_;
4187 StrictModeFlag strict_mode_flag_; 4232 StrictModeFlag strict_mode_flag_;
4188 }; 4233 };
4189 4234
4190 4235
4191 class HStoreKeyedFastElement: public HTemplateInstruction<3> { 4236 class HStoreKeyedFastElement
4237 : public HTemplateInstruction<3>, public ArrayInstructionInterface {
4192 public: 4238 public:
4193 HStoreKeyedFastElement(HValue* obj, HValue* key, HValue* val, 4239 HStoreKeyedFastElement(HValue* obj, HValue* key, HValue* val,
4194 ElementsKind elements_kind = FAST_ELEMENTS) 4240 ElementsKind elements_kind = FAST_ELEMENTS)
4195 : elements_kind_(elements_kind) { 4241 : elements_kind_(elements_kind), index_offset_(0), is_dehoisted_(false) {
4196 SetOperandAt(0, obj); 4242 SetOperandAt(0, obj);
4197 SetOperandAt(1, key); 4243 SetOperandAt(1, key);
4198 SetOperandAt(2, val); 4244 SetOperandAt(2, val);
4199 SetGVNFlag(kChangesArrayElements); 4245 SetGVNFlag(kChangesArrayElements);
4200 } 4246 }
4201 4247
4202 virtual Representation RequiredInputRepresentation(int index) { 4248 virtual Representation RequiredInputRepresentation(int index) {
4203 // The key is supposed to be Integer32. 4249 // The key is supposed to be Integer32.
4204 return index == 1 4250 return index == 1
4205 ? Representation::Integer32() 4251 ? Representation::Integer32()
4206 : Representation::Tagged(); 4252 : Representation::Tagged();
4207 } 4253 }
4208 4254
4209 HValue* object() { return OperandAt(0); } 4255 HValue* object() { return OperandAt(0); }
4210 HValue* key() { return OperandAt(1); } 4256 HValue* key() { return OperandAt(1); }
4211 HValue* value() { return OperandAt(2); } 4257 HValue* value() { return OperandAt(2); }
4212 bool value_is_smi() { 4258 bool value_is_smi() {
4213 return elements_kind_ == FAST_SMI_ONLY_ELEMENTS; 4259 return elements_kind_ == FAST_SMI_ONLY_ELEMENTS;
4214 } 4260 }
4261 uint32_t index_offset() { return index_offset_; }
4262 void SetIndexOffset(uint32_t index_offset) { index_offset_ = index_offset; }
4263 HValue* GetKey() { return key(); }
4264 void SetKey(HValue* key) { SetOperandAt(1, key); }
4265 bool IsDehoisted() { return is_dehoisted_; }
4266 void SetDehoisted(bool is_dehoisted) { is_dehoisted_ = is_dehoisted; }
4215 4267
4216 bool NeedsWriteBarrier() { 4268 bool NeedsWriteBarrier() {
4217 if (value_is_smi()) { 4269 if (value_is_smi()) {
4218 return false; 4270 return false;
4219 } else { 4271 } else {
4220 return StoringValueNeedsWriteBarrier(value()); 4272 return StoringValueNeedsWriteBarrier(value());
4221 } 4273 }
4222 } 4274 }
4223 4275
4224 virtual void PrintDataTo(StringStream* stream); 4276 virtual void PrintDataTo(StringStream* stream);
4225 4277
4226 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement) 4278 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastElement)
4227 4279
4228 private: 4280 private:
4229 ElementsKind elements_kind_; 4281 ElementsKind elements_kind_;
4282 uint32_t index_offset_;
4283 bool is_dehoisted_;
4230 }; 4284 };
4231 4285
4232 4286
4233 class HStoreKeyedFastDoubleElement: public HTemplateInstruction<3> { 4287 class HStoreKeyedFastDoubleElement
4288 : public HTemplateInstruction<3>, public ArrayInstructionInterface {
4234 public: 4289 public:
4235 HStoreKeyedFastDoubleElement(HValue* elements, 4290 HStoreKeyedFastDoubleElement(HValue* elements,
4236 HValue* key, 4291 HValue* key,
4237 HValue* val) { 4292 HValue* val)
4293 : index_offset_(0), is_dehoisted_(false) {
4238 SetOperandAt(0, elements); 4294 SetOperandAt(0, elements);
4239 SetOperandAt(1, key); 4295 SetOperandAt(1, key);
4240 SetOperandAt(2, val); 4296 SetOperandAt(2, val);
4241 SetGVNFlag(kChangesDoubleArrayElements); 4297 SetGVNFlag(kChangesDoubleArrayElements);
4242 } 4298 }
4243 4299
4244 virtual Representation RequiredInputRepresentation(int index) { 4300 virtual Representation RequiredInputRepresentation(int index) {
4245 if (index == 1) { 4301 if (index == 1) {
4246 return Representation::Integer32(); 4302 return Representation::Integer32();
4247 } else if (index == 2) { 4303 } else if (index == 2) {
4248 return Representation::Double(); 4304 return Representation::Double();
4249 } else { 4305 } else {
4250 return Representation::Tagged(); 4306 return Representation::Tagged();
4251 } 4307 }
4252 } 4308 }
4253 4309
4254 HValue* elements() { return OperandAt(0); } 4310 HValue* elements() { return OperandAt(0); }
4255 HValue* key() { return OperandAt(1); } 4311 HValue* key() { return OperandAt(1); }
4256 HValue* value() { return OperandAt(2); } 4312 HValue* value() { return OperandAt(2); }
4313 uint32_t index_offset() { return index_offset_; }
4314 void SetIndexOffset(uint32_t index_offset) { index_offset_ = index_offset; }
4315 HValue* GetKey() { return key(); }
4316 void SetKey(HValue* key) { SetOperandAt(1, key); }
4317 bool IsDehoisted() { return is_dehoisted_; }
4318 void SetDehoisted(bool is_dehoisted) { is_dehoisted_ = is_dehoisted; }
4257 4319
4258 bool NeedsWriteBarrier() { 4320 bool NeedsWriteBarrier() {
4259 return StoringValueNeedsWriteBarrier(value()); 4321 return StoringValueNeedsWriteBarrier(value());
4260 } 4322 }
4261 4323
4262 bool NeedsCanonicalization(); 4324 bool NeedsCanonicalization();
4263 4325
4264 virtual void PrintDataTo(StringStream* stream); 4326 virtual void PrintDataTo(StringStream* stream);
4265 4327
4266 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastDoubleElement) 4328 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedFastDoubleElement)
4329
4330 private:
4331 uint32_t index_offset_;
4332 bool is_dehoisted_;
4267 }; 4333 };
4268 4334
4269 4335
4270 class HStoreKeyedSpecializedArrayElement: public HTemplateInstruction<3> { 4336 class HStoreKeyedSpecializedArrayElement
4337 : public HTemplateInstruction<3>, public ArrayInstructionInterface {
4271 public: 4338 public:
4272 HStoreKeyedSpecializedArrayElement(HValue* external_elements, 4339 HStoreKeyedSpecializedArrayElement(HValue* external_elements,
4273 HValue* key, 4340 HValue* key,
4274 HValue* val, 4341 HValue* val,
4275 ElementsKind elements_kind) 4342 ElementsKind elements_kind)
4276 : elements_kind_(elements_kind) { 4343 : elements_kind_(elements_kind), index_offset_(0), is_dehoisted_(false) {
4277 SetGVNFlag(kChangesSpecializedArrayElements); 4344 SetGVNFlag(kChangesSpecializedArrayElements);
4278 SetOperandAt(0, external_elements); 4345 SetOperandAt(0, external_elements);
4279 SetOperandAt(1, key); 4346 SetOperandAt(1, key);
4280 SetOperandAt(2, val); 4347 SetOperandAt(2, val);
4281 } 4348 }
4282 4349
4283 virtual void PrintDataTo(StringStream* stream); 4350 virtual void PrintDataTo(StringStream* stream);
4284 4351
4285 virtual Representation RequiredInputRepresentation(int index) { 4352 virtual Representation RequiredInputRepresentation(int index) {
4286 if (index == 0) { 4353 if (index == 0) {
4287 return Representation::External(); 4354 return Representation::External();
4288 } else { 4355 } else {
4289 bool float_or_double_elements = 4356 bool float_or_double_elements =
4290 elements_kind() == EXTERNAL_FLOAT_ELEMENTS || 4357 elements_kind() == EXTERNAL_FLOAT_ELEMENTS ||
4291 elements_kind() == EXTERNAL_DOUBLE_ELEMENTS; 4358 elements_kind() == EXTERNAL_DOUBLE_ELEMENTS;
4292 if (index == 2 && float_or_double_elements) { 4359 if (index == 2 && float_or_double_elements) {
4293 return Representation::Double(); 4360 return Representation::Double();
4294 } else { 4361 } else {
4295 return Representation::Integer32(); 4362 return Representation::Integer32();
4296 } 4363 }
4297 } 4364 }
4298 } 4365 }
4299 4366
4300 HValue* external_pointer() { return OperandAt(0); } 4367 HValue* external_pointer() { return OperandAt(0); }
4301 HValue* key() { return OperandAt(1); } 4368 HValue* key() { return OperandAt(1); }
4302 HValue* value() { return OperandAt(2); } 4369 HValue* value() { return OperandAt(2); }
4303 ElementsKind elements_kind() const { return elements_kind_; } 4370 ElementsKind elements_kind() const { return elements_kind_; }
4371 uint32_t index_offset() { return index_offset_; }
4372 void SetIndexOffset(uint32_t index_offset) { index_offset_ = index_offset; }
4373 HValue* GetKey() { return key(); }
4374 void SetKey(HValue* key) { SetOperandAt(1, key); }
4375 bool IsDehoisted() { return is_dehoisted_; }
4376 void SetDehoisted(bool is_dehoisted) { is_dehoisted_ = is_dehoisted; }
4304 4377
4305 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedSpecializedArrayElement) 4378 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedSpecializedArrayElement)
4306 4379
4307 private: 4380 private:
4308 ElementsKind elements_kind_; 4381 ElementsKind elements_kind_;
4382 uint32_t index_offset_;
4383 bool is_dehoisted_;
4309 }; 4384 };
4310 4385
4311 4386
4312 class HStoreKeyedGeneric: public HTemplateInstruction<4> { 4387 class HStoreKeyedGeneric: public HTemplateInstruction<4> {
4313 public: 4388 public:
4314 HStoreKeyedGeneric(HValue* context, 4389 HStoreKeyedGeneric(HValue* context,
4315 HValue* object, 4390 HValue* object,
4316 HValue* key, 4391 HValue* key,
4317 HValue* value, 4392 HValue* value,
4318 StrictModeFlag strict_mode_flag) 4393 StrictModeFlag strict_mode_flag)
(...skipping 640 matching lines...) Expand 10 before | Expand all | Expand 10 after
4959 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex); 5034 DECLARE_CONCRETE_INSTRUCTION(LoadFieldByIndex);
4960 }; 5035 };
4961 5036
4962 5037
4963 #undef DECLARE_INSTRUCTION 5038 #undef DECLARE_INSTRUCTION
4964 #undef DECLARE_CONCRETE_INSTRUCTION 5039 #undef DECLARE_CONCRETE_INSTRUCTION
4965 5040
4966 } } // namespace v8::internal 5041 } } // namespace v8::internal
4967 5042
4968 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 5043 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/lithium-codegen-ia32.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698