| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
| 2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
| 3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 5 #ifndef V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
| 6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 6 #define V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
| 7 | 7 |
| 8 #include <cstring> | 8 #include <cstring> |
| 9 #include <iosfwd> | 9 #include <iosfwd> |
| 10 | 10 |
| (...skipping 4857 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4868 } | 4868 } |
| 4869 | 4869 |
| 4870 HEnvironment* environment_; | 4870 HEnvironment* environment_; |
| 4871 int index_; | 4871 int index_; |
| 4872 HPhi* incoming_value_; | 4872 HPhi* incoming_value_; |
| 4873 }; | 4873 }; |
| 4874 | 4874 |
| 4875 | 4875 |
| 4876 class HLoadGlobalGeneric final : public HTemplateInstruction<2> { | 4876 class HLoadGlobalGeneric final : public HTemplateInstruction<2> { |
| 4877 public: | 4877 public: |
| 4878 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HLoadGlobalGeneric, HValue*, | 4878 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P5(HLoadGlobalGeneric, HValue*, |
| 4879 Handle<String>, TypeofMode); | 4879 Handle<String>, TypeofMode, |
| 4880 Handle<TypeFeedbackVector>, |
| 4881 FeedbackVectorSlot); |
| 4880 | 4882 |
| 4881 HValue* context() { return OperandAt(0); } | 4883 HValue* context() { return OperandAt(0); } |
| 4882 HValue* global_object() { return OperandAt(1); } | 4884 HValue* global_object() { return OperandAt(1); } |
| 4883 Handle<String> name() const { return name_; } | 4885 Handle<String> name() const { return name_; } |
| 4884 TypeofMode typeof_mode() const { return typeof_mode_; } | 4886 TypeofMode typeof_mode() const { return typeof_mode_; } |
| 4885 FeedbackVectorSlot slot() const { return slot_; } | 4887 FeedbackVectorSlot slot() const { return slot_; } |
| 4886 Handle<TypeFeedbackVector> feedback_vector() const { | 4888 Handle<TypeFeedbackVector> feedback_vector() const { |
| 4887 return feedback_vector_; | 4889 return feedback_vector_; |
| 4888 } | 4890 } |
| 4889 bool HasVectorAndSlot() const { return true; } | |
| 4890 void SetVectorAndSlot(Handle<TypeFeedbackVector> vector, | |
| 4891 FeedbackVectorSlot slot) { | |
| 4892 feedback_vector_ = vector; | |
| 4893 slot_ = slot; | |
| 4894 } | |
| 4895 | 4891 |
| 4896 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT | 4892 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT |
| 4897 | 4893 |
| 4898 Representation RequiredInputRepresentation(int index) override { | 4894 Representation RequiredInputRepresentation(int index) override { |
| 4899 return Representation::Tagged(); | 4895 return Representation::Tagged(); |
| 4900 } | 4896 } |
| 4901 | 4897 |
| 4902 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric) | 4898 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric) |
| 4903 | 4899 |
| 4904 private: | 4900 private: |
| 4905 HLoadGlobalGeneric(HValue* context, HValue* global_object, | 4901 HLoadGlobalGeneric(HValue* context, HValue* global_object, |
| 4906 Handle<String> name, TypeofMode typeof_mode) | 4902 Handle<String> name, TypeofMode typeof_mode, |
| 4907 : name_(name), typeof_mode_(typeof_mode) { | 4903 Handle<TypeFeedbackVector> vector, FeedbackVectorSlot slot) |
| 4904 : name_(name), |
| 4905 typeof_mode_(typeof_mode), |
| 4906 feedback_vector_(vector), |
| 4907 slot_(slot) { |
| 4908 SetOperandAt(0, context); | 4908 SetOperandAt(0, context); |
| 4909 SetOperandAt(1, global_object); | 4909 SetOperandAt(1, global_object); |
| 4910 set_representation(Representation::Tagged()); | 4910 set_representation(Representation::Tagged()); |
| 4911 SetAllSideEffects(); | 4911 SetAllSideEffects(); |
| 4912 } | 4912 } |
| 4913 | 4913 |
| 4914 Handle<String> name_; | 4914 Handle<String> name_; |
| 4915 TypeofMode typeof_mode_; | 4915 TypeofMode typeof_mode_; |
| 4916 Handle<TypeFeedbackVector> feedback_vector_; | 4916 Handle<TypeFeedbackVector> feedback_vector_; |
| 4917 FeedbackVectorSlot slot_; | 4917 FeedbackVectorSlot slot_; |
| (...skipping 962 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5880 | 5880 |
| 5881 bool IsDeletable() const override { return true; } | 5881 bool IsDeletable() const override { return true; } |
| 5882 | 5882 |
| 5883 HObjectAccess access_; | 5883 HObjectAccess access_; |
| 5884 const UniqueSet<Map>* maps_; | 5884 const UniqueSet<Map>* maps_; |
| 5885 }; | 5885 }; |
| 5886 | 5886 |
| 5887 | 5887 |
| 5888 class HLoadNamedGeneric final : public HTemplateInstruction<2> { | 5888 class HLoadNamedGeneric final : public HTemplateInstruction<2> { |
| 5889 public: | 5889 public: |
| 5890 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HLoadNamedGeneric, HValue*, | 5890 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HLoadNamedGeneric, HValue*, |
| 5891 Handle<Name>, InlineCacheState); | 5891 Handle<Name>, |
| 5892 Handle<TypeFeedbackVector>, |
| 5893 FeedbackVectorSlot); |
| 5892 | 5894 |
| 5893 HValue* context() const { return OperandAt(0); } | 5895 HValue* context() const { return OperandAt(0); } |
| 5894 HValue* object() const { return OperandAt(1); } | 5896 HValue* object() const { return OperandAt(1); } |
| 5895 Handle<Name> name() const { return name_; } | 5897 Handle<Name> name() const { return name_; } |
| 5896 | 5898 |
| 5897 InlineCacheState initialization_state() const { | |
| 5898 return initialization_state_; | |
| 5899 } | |
| 5900 FeedbackVectorSlot slot() const { return slot_; } | 5899 FeedbackVectorSlot slot() const { return slot_; } |
| 5901 Handle<TypeFeedbackVector> feedback_vector() const { | 5900 Handle<TypeFeedbackVector> feedback_vector() const { |
| 5902 return feedback_vector_; | 5901 return feedback_vector_; |
| 5903 } | 5902 } |
| 5904 bool HasVectorAndSlot() const { return true; } | |
| 5905 void SetVectorAndSlot(Handle<TypeFeedbackVector> vector, | |
| 5906 FeedbackVectorSlot slot) { | |
| 5907 feedback_vector_ = vector; | |
| 5908 slot_ = slot; | |
| 5909 } | |
| 5910 | 5903 |
| 5911 Representation RequiredInputRepresentation(int index) override { | 5904 Representation RequiredInputRepresentation(int index) override { |
| 5912 return Representation::Tagged(); | 5905 return Representation::Tagged(); |
| 5913 } | 5906 } |
| 5914 | 5907 |
| 5915 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT | 5908 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT |
| 5916 | 5909 |
| 5917 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric) | 5910 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric) |
| 5918 | 5911 |
| 5919 private: | 5912 private: |
| 5920 HLoadNamedGeneric(HValue* context, HValue* object, Handle<Name> name, | 5913 HLoadNamedGeneric(HValue* context, HValue* object, Handle<Name> name, |
| 5921 InlineCacheState initialization_state) | 5914 Handle<TypeFeedbackVector> vector, FeedbackVectorSlot slot) |
| 5922 : name_(name), | 5915 : name_(name), feedback_vector_(vector), slot_(slot) { |
| 5923 initialization_state_(initialization_state) { | |
| 5924 SetOperandAt(0, context); | 5916 SetOperandAt(0, context); |
| 5925 SetOperandAt(1, object); | 5917 SetOperandAt(1, object); |
| 5926 set_representation(Representation::Tagged()); | 5918 set_representation(Representation::Tagged()); |
| 5927 SetAllSideEffects(); | 5919 SetAllSideEffects(); |
| 5928 } | 5920 } |
| 5929 | 5921 |
| 5930 Handle<Name> name_; | 5922 Handle<Name> name_; |
| 5931 Handle<TypeFeedbackVector> feedback_vector_; | 5923 Handle<TypeFeedbackVector> feedback_vector_; |
| 5932 FeedbackVectorSlot slot_; | 5924 FeedbackVectorSlot slot_; |
| 5933 InlineCacheState initialization_state_; | |
| 5934 }; | 5925 }; |
| 5935 | 5926 |
| 5936 | 5927 |
| 5937 class HLoadFunctionPrototype final : public HUnaryOperation { | 5928 class HLoadFunctionPrototype final : public HUnaryOperation { |
| 5938 public: | 5929 public: |
| 5939 DECLARE_INSTRUCTION_FACTORY_P1(HLoadFunctionPrototype, HValue*); | 5930 DECLARE_INSTRUCTION_FACTORY_P1(HLoadFunctionPrototype, HValue*); |
| 5940 | 5931 |
| 5941 HValue* function() { return OperandAt(0); } | 5932 HValue* function() { return OperandAt(0); } |
| 5942 | 5933 |
| 5943 Representation RequiredInputRepresentation(int index) override { | 5934 Representation RequiredInputRepresentation(int index) override { |
| (...skipping 221 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6165 {}; // NOLINT | 6156 {}; // NOLINT |
| 6166 class IsDehoistedField: | 6157 class IsDehoistedField: |
| 6167 public BitField<bool, kStartIsDehoisted, kBitsForIsDehoisted> | 6158 public BitField<bool, kStartIsDehoisted, kBitsForIsDehoisted> |
| 6168 {}; // NOLINT | 6159 {}; // NOLINT |
| 6169 uint32_t bit_field_; | 6160 uint32_t bit_field_; |
| 6170 }; | 6161 }; |
| 6171 | 6162 |
| 6172 | 6163 |
| 6173 class HLoadKeyedGeneric final : public HTemplateInstruction<3> { | 6164 class HLoadKeyedGeneric final : public HTemplateInstruction<3> { |
| 6174 public: | 6165 public: |
| 6175 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HLoadKeyedGeneric, HValue*, | 6166 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HLoadKeyedGeneric, HValue*, |
| 6176 HValue*, InlineCacheState); | 6167 HValue*, |
| 6168 Handle<TypeFeedbackVector>, |
| 6169 FeedbackVectorSlot); |
| 6177 HValue* object() const { return OperandAt(0); } | 6170 HValue* object() const { return OperandAt(0); } |
| 6178 HValue* key() const { return OperandAt(1); } | 6171 HValue* key() const { return OperandAt(1); } |
| 6179 HValue* context() const { return OperandAt(2); } | 6172 HValue* context() const { return OperandAt(2); } |
| 6180 InlineCacheState initialization_state() const { | |
| 6181 return initialization_state_; | |
| 6182 } | |
| 6183 FeedbackVectorSlot slot() const { return slot_; } | 6173 FeedbackVectorSlot slot() const { return slot_; } |
| 6184 Handle<TypeFeedbackVector> feedback_vector() const { | 6174 Handle<TypeFeedbackVector> feedback_vector() const { |
| 6185 return feedback_vector_; | 6175 return feedback_vector_; |
| 6186 } | 6176 } |
| 6187 bool HasVectorAndSlot() const { | |
| 6188 DCHECK(initialization_state_ == MEGAMORPHIC || !feedback_vector_.is_null()); | |
| 6189 return !feedback_vector_.is_null(); | |
| 6190 } | |
| 6191 void SetVectorAndSlot(Handle<TypeFeedbackVector> vector, | |
| 6192 FeedbackVectorSlot slot) { | |
| 6193 feedback_vector_ = vector; | |
| 6194 slot_ = slot; | |
| 6195 } | |
| 6196 | 6177 |
| 6197 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT | 6178 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT |
| 6198 | 6179 |
| 6199 Representation RequiredInputRepresentation(int index) override { | 6180 Representation RequiredInputRepresentation(int index) override { |
| 6200 // tagged[tagged] | 6181 // tagged[tagged] |
| 6201 return Representation::Tagged(); | 6182 return Representation::Tagged(); |
| 6202 } | 6183 } |
| 6203 | 6184 |
| 6204 HValue* Canonicalize() override; | 6185 HValue* Canonicalize() override; |
| 6205 | 6186 |
| 6206 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric) | 6187 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric) |
| 6207 | 6188 |
| 6208 private: | 6189 private: |
| 6209 HLoadKeyedGeneric(HValue* context, HValue* obj, HValue* key, | 6190 HLoadKeyedGeneric(HValue* context, HValue* obj, HValue* key, |
| 6210 InlineCacheState initialization_state) | 6191 Handle<TypeFeedbackVector> vector, FeedbackVectorSlot slot) |
| 6211 : initialization_state_(initialization_state) { | 6192 : feedback_vector_(vector), slot_(slot) { |
| 6212 set_representation(Representation::Tagged()); | 6193 set_representation(Representation::Tagged()); |
| 6213 SetOperandAt(0, obj); | 6194 SetOperandAt(0, obj); |
| 6214 SetOperandAt(1, key); | 6195 SetOperandAt(1, key); |
| 6215 SetOperandAt(2, context); | 6196 SetOperandAt(2, context); |
| 6216 SetAllSideEffects(); | 6197 SetAllSideEffects(); |
| 6217 } | 6198 } |
| 6218 | 6199 |
| 6219 Handle<TypeFeedbackVector> feedback_vector_; | 6200 Handle<TypeFeedbackVector> feedback_vector_; |
| 6220 FeedbackVectorSlot slot_; | 6201 FeedbackVectorSlot slot_; |
| 6221 InlineCacheState initialization_state_; | |
| 6222 }; | 6202 }; |
| 6223 | 6203 |
| 6224 | 6204 |
| 6225 // Indicates whether the store is a store to an entry that was previously | 6205 // Indicates whether the store is a store to an entry that was previously |
| 6226 // initialized or not. | 6206 // initialized or not. |
| 6227 enum StoreFieldOrKeyedMode { | 6207 enum StoreFieldOrKeyedMode { |
| 6228 // The entry could be either previously initialized or not. | 6208 // The entry could be either previously initialized or not. |
| 6229 INITIALIZING_STORE, | 6209 INITIALIZING_STORE, |
| 6230 // At the time of this store it is guaranteed that the entry is already | 6210 // At the time of this store it is guaranteed that the entry is already |
| 6231 // initialized. | 6211 // initialized. |
| (...skipping 141 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6373 } | 6353 } |
| 6374 | 6354 |
| 6375 class HasTransitionField : public BitField<bool, 0, 1> {}; | 6355 class HasTransitionField : public BitField<bool, 0, 1> {}; |
| 6376 class StoreModeField : public BitField<StoreFieldOrKeyedMode, 1, 1> {}; | 6356 class StoreModeField : public BitField<StoreFieldOrKeyedMode, 1, 1> {}; |
| 6377 | 6357 |
| 6378 HObjectAccess access_; | 6358 HObjectAccess access_; |
| 6379 HValue* dominator_; | 6359 HValue* dominator_; |
| 6380 uint32_t bit_field_; | 6360 uint32_t bit_field_; |
| 6381 }; | 6361 }; |
| 6382 | 6362 |
| 6383 | |
| 6384 class HStoreNamedGeneric final : public HTemplateInstruction<3> { | 6363 class HStoreNamedGeneric final : public HTemplateInstruction<3> { |
| 6385 public: | 6364 public: |
| 6386 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P5(HStoreNamedGeneric, HValue*, | 6365 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P6(HStoreNamedGeneric, HValue*, |
| 6387 Handle<Name>, HValue*, | 6366 Handle<Name>, HValue*, |
| 6388 LanguageMode, InlineCacheState); | 6367 LanguageMode, |
| 6368 Handle<TypeFeedbackVector>, |
| 6369 FeedbackVectorSlot); |
| 6389 HValue* object() const { return OperandAt(0); } | 6370 HValue* object() const { return OperandAt(0); } |
| 6390 HValue* value() const { return OperandAt(1); } | 6371 HValue* value() const { return OperandAt(1); } |
| 6391 HValue* context() const { return OperandAt(2); } | 6372 HValue* context() const { return OperandAt(2); } |
| 6392 Handle<Name> name() const { return name_; } | 6373 Handle<Name> name() const { return name_; } |
| 6393 LanguageMode language_mode() const { return language_mode_; } | 6374 LanguageMode language_mode() const { return language_mode_; } |
| 6394 InlineCacheState initialization_state() const { | |
| 6395 return initialization_state_; | |
| 6396 } | |
| 6397 | 6375 |
| 6398 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT | 6376 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT |
| 6399 | 6377 |
| 6400 Representation RequiredInputRepresentation(int index) override { | 6378 Representation RequiredInputRepresentation(int index) override { |
| 6401 return Representation::Tagged(); | 6379 return Representation::Tagged(); |
| 6402 } | 6380 } |
| 6403 | 6381 |
| 6404 FeedbackVectorSlot slot() const { return slot_; } | 6382 FeedbackVectorSlot slot() const { return slot_; } |
| 6405 Handle<TypeFeedbackVector> feedback_vector() const { | 6383 Handle<TypeFeedbackVector> feedback_vector() const { |
| 6406 return feedback_vector_; | 6384 return feedback_vector_; |
| 6407 } | 6385 } |
| 6408 bool HasVectorAndSlot() const { return true; } | |
| 6409 void SetVectorAndSlot(Handle<TypeFeedbackVector> vector, | |
| 6410 FeedbackVectorSlot slot) { | |
| 6411 feedback_vector_ = vector; | |
| 6412 slot_ = slot; | |
| 6413 } | |
| 6414 | 6386 |
| 6415 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric) | 6387 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric) |
| 6416 | 6388 |
| 6417 private: | 6389 private: |
| 6418 HStoreNamedGeneric(HValue* context, HValue* object, Handle<Name> name, | 6390 HStoreNamedGeneric(HValue* context, HValue* object, Handle<Name> name, |
| 6419 HValue* value, LanguageMode language_mode, | 6391 HValue* value, LanguageMode language_mode, |
| 6420 InlineCacheState initialization_state) | 6392 Handle<TypeFeedbackVector> vector, FeedbackVectorSlot slot) |
| 6421 : name_(name), | 6393 : name_(name), |
| 6422 language_mode_(language_mode), | 6394 feedback_vector_(vector), |
| 6423 initialization_state_(initialization_state) { | 6395 slot_(slot), |
| 6396 language_mode_(language_mode) { |
| 6424 SetOperandAt(0, object); | 6397 SetOperandAt(0, object); |
| 6425 SetOperandAt(1, value); | 6398 SetOperandAt(1, value); |
| 6426 SetOperandAt(2, context); | 6399 SetOperandAt(2, context); |
| 6427 SetAllSideEffects(); | 6400 SetAllSideEffects(); |
| 6428 } | 6401 } |
| 6429 | 6402 |
| 6430 Handle<Name> name_; | 6403 Handle<Name> name_; |
| 6431 Handle<TypeFeedbackVector> feedback_vector_; | 6404 Handle<TypeFeedbackVector> feedback_vector_; |
| 6432 FeedbackVectorSlot slot_; | 6405 FeedbackVectorSlot slot_; |
| 6433 LanguageMode language_mode_; | 6406 LanguageMode language_mode_; |
| 6434 InlineCacheState initialization_state_; | |
| 6435 }; | 6407 }; |
| 6436 | 6408 |
| 6437 | |
| 6438 class HStoreKeyed final : public HTemplateInstruction<4>, | 6409 class HStoreKeyed final : public HTemplateInstruction<4>, |
| 6439 public ArrayInstructionInterface { | 6410 public ArrayInstructionInterface { |
| 6440 public: | 6411 public: |
| 6441 DECLARE_INSTRUCTION_FACTORY_P5(HStoreKeyed, HValue*, HValue*, HValue*, | 6412 DECLARE_INSTRUCTION_FACTORY_P5(HStoreKeyed, HValue*, HValue*, HValue*, |
| 6442 HValue*, ElementsKind); | 6413 HValue*, ElementsKind); |
| 6443 DECLARE_INSTRUCTION_FACTORY_P6(HStoreKeyed, HValue*, HValue*, HValue*, | 6414 DECLARE_INSTRUCTION_FACTORY_P6(HStoreKeyed, HValue*, HValue*, HValue*, |
| 6444 HValue*, ElementsKind, StoreFieldOrKeyedMode); | 6415 HValue*, ElementsKind, StoreFieldOrKeyedMode); |
| 6445 DECLARE_INSTRUCTION_FACTORY_P7(HStoreKeyed, HValue*, HValue*, HValue*, | 6416 DECLARE_INSTRUCTION_FACTORY_P7(HStoreKeyed, HValue*, HValue*, HValue*, |
| 6446 HValue*, ElementsKind, StoreFieldOrKeyedMode, | 6417 HValue*, ElementsKind, StoreFieldOrKeyedMode, |
| 6447 int); | 6418 int); |
| (...skipping 162 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6610 class IsDehoistedField : public BitField<bool, 0, 1> {}; | 6581 class IsDehoistedField : public BitField<bool, 0, 1> {}; |
| 6611 class IsUninitializedField : public BitField<bool, 1, 1> {}; | 6582 class IsUninitializedField : public BitField<bool, 1, 1> {}; |
| 6612 class StoreModeField : public BitField<StoreFieldOrKeyedMode, 2, 1> {}; | 6583 class StoreModeField : public BitField<StoreFieldOrKeyedMode, 2, 1> {}; |
| 6613 class ElementsKindField : public BitField<ElementsKind, 3, 5> {}; | 6584 class ElementsKindField : public BitField<ElementsKind, 3, 5> {}; |
| 6614 | 6585 |
| 6615 uint32_t base_offset_; | 6586 uint32_t base_offset_; |
| 6616 uint32_t bit_field_; | 6587 uint32_t bit_field_; |
| 6617 HValue* dominator_; | 6588 HValue* dominator_; |
| 6618 }; | 6589 }; |
| 6619 | 6590 |
| 6620 | |
| 6621 class HStoreKeyedGeneric final : public HTemplateInstruction<4> { | 6591 class HStoreKeyedGeneric final : public HTemplateInstruction<4> { |
| 6622 public: | 6592 public: |
| 6623 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P5(HStoreKeyedGeneric, HValue*, | 6593 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P6(HStoreKeyedGeneric, HValue*, |
| 6624 HValue*, HValue*, LanguageMode, | 6594 HValue*, HValue*, LanguageMode, |
| 6625 InlineCacheState); | 6595 Handle<TypeFeedbackVector>, |
| 6596 FeedbackVectorSlot); |
| 6626 | 6597 |
| 6627 HValue* object() const { return OperandAt(0); } | 6598 HValue* object() const { return OperandAt(0); } |
| 6628 HValue* key() const { return OperandAt(1); } | 6599 HValue* key() const { return OperandAt(1); } |
| 6629 HValue* value() const { return OperandAt(2); } | 6600 HValue* value() const { return OperandAt(2); } |
| 6630 HValue* context() const { return OperandAt(3); } | 6601 HValue* context() const { return OperandAt(3); } |
| 6631 LanguageMode language_mode() const { return language_mode_; } | 6602 LanguageMode language_mode() const { return language_mode_; } |
| 6632 InlineCacheState initialization_state() const { | |
| 6633 return initialization_state_; | |
| 6634 } | |
| 6635 | 6603 |
| 6636 Representation RequiredInputRepresentation(int index) override { | 6604 Representation RequiredInputRepresentation(int index) override { |
| 6637 // tagged[tagged] = tagged | 6605 // tagged[tagged] = tagged |
| 6638 return Representation::Tagged(); | 6606 return Representation::Tagged(); |
| 6639 } | 6607 } |
| 6640 | 6608 |
| 6641 FeedbackVectorSlot slot() const { return slot_; } | 6609 FeedbackVectorSlot slot() const { return slot_; } |
| 6642 Handle<TypeFeedbackVector> feedback_vector() const { | 6610 Handle<TypeFeedbackVector> feedback_vector() const { |
| 6643 return feedback_vector_; | 6611 return feedback_vector_; |
| 6644 } | 6612 } |
| 6645 bool HasVectorAndSlot() const { | |
| 6646 return !feedback_vector_.is_null(); | |
| 6647 } | |
| 6648 void SetVectorAndSlot(Handle<TypeFeedbackVector> vector, | |
| 6649 FeedbackVectorSlot slot) { | |
| 6650 feedback_vector_ = vector; | |
| 6651 slot_ = slot; | |
| 6652 } | |
| 6653 | 6613 |
| 6654 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT | 6614 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT |
| 6655 | 6615 |
| 6656 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric) | 6616 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric) |
| 6657 | 6617 |
| 6658 private: | 6618 private: |
| 6659 HStoreKeyedGeneric(HValue* context, HValue* object, HValue* key, | 6619 HStoreKeyedGeneric(HValue* context, HValue* object, HValue* key, |
| 6660 HValue* value, LanguageMode language_mode, | 6620 HValue* value, LanguageMode language_mode, |
| 6661 InlineCacheState initialization_state) | 6621 Handle<TypeFeedbackVector> vector, FeedbackVectorSlot slot) |
| 6662 : language_mode_(language_mode), | 6622 : feedback_vector_(vector), slot_(slot), language_mode_(language_mode) { |
| 6663 initialization_state_(initialization_state) { | |
| 6664 SetOperandAt(0, object); | 6623 SetOperandAt(0, object); |
| 6665 SetOperandAt(1, key); | 6624 SetOperandAt(1, key); |
| 6666 SetOperandAt(2, value); | 6625 SetOperandAt(2, value); |
| 6667 SetOperandAt(3, context); | 6626 SetOperandAt(3, context); |
| 6668 SetAllSideEffects(); | 6627 SetAllSideEffects(); |
| 6669 } | 6628 } |
| 6670 | 6629 |
| 6671 Handle<TypeFeedbackVector> feedback_vector_; | 6630 Handle<TypeFeedbackVector> feedback_vector_; |
| 6672 FeedbackVectorSlot slot_; | 6631 FeedbackVectorSlot slot_; |
| 6673 LanguageMode language_mode_; | 6632 LanguageMode language_mode_; |
| 6674 InlineCacheState initialization_state_; | |
| 6675 }; | 6633 }; |
| 6676 | 6634 |
| 6677 | |
| 6678 class HTransitionElementsKind final : public HTemplateInstruction<2> { | 6635 class HTransitionElementsKind final : public HTemplateInstruction<2> { |
| 6679 public: | 6636 public: |
| 6680 inline static HTransitionElementsKind* New(Isolate* isolate, Zone* zone, | 6637 inline static HTransitionElementsKind* New(Isolate* isolate, Zone* zone, |
| 6681 HValue* context, HValue* object, | 6638 HValue* context, HValue* object, |
| 6682 Handle<Map> original_map, | 6639 Handle<Map> original_map, |
| 6683 Handle<Map> transitioned_map) { | 6640 Handle<Map> transitioned_map) { |
| 6684 return new(zone) HTransitionElementsKind(context, object, | 6641 return new(zone) HTransitionElementsKind(context, object, |
| 6685 original_map, transitioned_map); | 6642 original_map, transitioned_map); |
| 6686 } | 6643 } |
| 6687 | 6644 |
| (...skipping 516 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7204 bool IsDeletable() const override { return true; } | 7161 bool IsDeletable() const override { return true; } |
| 7205 }; | 7162 }; |
| 7206 | 7163 |
| 7207 #undef DECLARE_INSTRUCTION | 7164 #undef DECLARE_INSTRUCTION |
| 7208 #undef DECLARE_CONCRETE_INSTRUCTION | 7165 #undef DECLARE_CONCRETE_INSTRUCTION |
| 7209 | 7166 |
| 7210 } // namespace internal | 7167 } // namespace internal |
| 7211 } // namespace v8 | 7168 } // namespace v8 |
| 7212 | 7169 |
| 7213 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 7170 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |