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_HYDROGEN_INSTRUCTIONS_H_ | 5 #ifndef V8_HYDROGEN_INSTRUCTIONS_H_ |
6 #define V8_HYDROGEN_INSTRUCTIONS_H_ | 6 #define V8_HYDROGEN_INSTRUCTIONS_H_ |
7 | 7 |
8 #include <cstring> | 8 #include <cstring> |
9 #include <iosfwd> | 9 #include <iosfwd> |
10 | 10 |
(...skipping 2386 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2397 class HCallFunction final : public HBinaryCall { | 2397 class HCallFunction final : public HBinaryCall { |
2398 public: | 2398 public: |
2399 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HCallFunction, HValue*, int); | 2399 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HCallFunction, HValue*, int); |
2400 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3( | 2400 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3( |
2401 HCallFunction, HValue*, int, CallFunctionFlags); | 2401 HCallFunction, HValue*, int, CallFunctionFlags); |
2402 | 2402 |
2403 HValue* context() const { return first(); } | 2403 HValue* context() const { return first(); } |
2404 HValue* function() const { return second(); } | 2404 HValue* function() const { return second(); } |
2405 CallFunctionFlags function_flags() const { return function_flags_; } | 2405 CallFunctionFlags function_flags() const { return function_flags_; } |
2406 | 2406 |
2407 FeedbackVectorICSlot slot() const { return slot_; } | 2407 FeedbackVectorSlot slot() const { return slot_; } |
2408 Handle<TypeFeedbackVector> feedback_vector() const { | 2408 Handle<TypeFeedbackVector> feedback_vector() const { |
2409 return feedback_vector_; | 2409 return feedback_vector_; |
2410 } | 2410 } |
2411 bool HasVectorAndSlot() const { return !feedback_vector_.is_null(); } | 2411 bool HasVectorAndSlot() const { return !feedback_vector_.is_null(); } |
2412 void SetVectorAndSlot(Handle<TypeFeedbackVector> vector, | 2412 void SetVectorAndSlot(Handle<TypeFeedbackVector> vector, |
2413 FeedbackVectorICSlot slot) { | 2413 FeedbackVectorSlot slot) { |
2414 feedback_vector_ = vector; | 2414 feedback_vector_ = vector; |
2415 slot_ = slot; | 2415 slot_ = slot; |
2416 } | 2416 } |
2417 | 2417 |
2418 DECLARE_CONCRETE_INSTRUCTION(CallFunction) | 2418 DECLARE_CONCRETE_INSTRUCTION(CallFunction) |
2419 | 2419 |
2420 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT | 2420 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT |
2421 | 2421 |
2422 int argument_delta() const override { return -argument_count(); } | 2422 int argument_delta() const override { return -argument_count(); } |
2423 | 2423 |
2424 private: | 2424 private: |
2425 HCallFunction(HValue* context, HValue* function, int argument_count, | 2425 HCallFunction(HValue* context, HValue* function, int argument_count, |
2426 CallFunctionFlags flags = NO_CALL_FUNCTION_FLAGS) | 2426 CallFunctionFlags flags = NO_CALL_FUNCTION_FLAGS) |
2427 : HBinaryCall(context, function, argument_count), | 2427 : HBinaryCall(context, function, argument_count), |
2428 function_flags_(flags), | 2428 function_flags_(flags) {} |
2429 slot_(FeedbackVectorICSlot::Invalid()) {} | |
2430 CallFunctionFlags function_flags_; | 2429 CallFunctionFlags function_flags_; |
2431 Handle<TypeFeedbackVector> feedback_vector_; | 2430 Handle<TypeFeedbackVector> feedback_vector_; |
2432 FeedbackVectorICSlot slot_; | 2431 FeedbackVectorSlot slot_; |
2433 }; | 2432 }; |
2434 | 2433 |
2435 | 2434 |
2436 class HCallNew final : public HBinaryCall { | 2435 class HCallNew final : public HBinaryCall { |
2437 public: | 2436 public: |
2438 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HCallNew, HValue*, int); | 2437 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HCallNew, HValue*, int); |
2439 | 2438 |
2440 HValue* context() { return first(); } | 2439 HValue* context() { return first(); } |
2441 HValue* constructor() { return second(); } | 2440 HValue* constructor() { return second(); } |
2442 | 2441 |
(...skipping 2965 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
5408 | 5407 |
5409 class HLoadGlobalGeneric final : public HTemplateInstruction<2> { | 5408 class HLoadGlobalGeneric final : public HTemplateInstruction<2> { |
5410 public: | 5409 public: |
5411 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HLoadGlobalGeneric, HValue*, | 5410 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HLoadGlobalGeneric, HValue*, |
5412 Handle<String>, TypeofMode); | 5411 Handle<String>, TypeofMode); |
5413 | 5412 |
5414 HValue* context() { return OperandAt(0); } | 5413 HValue* context() { return OperandAt(0); } |
5415 HValue* global_object() { return OperandAt(1); } | 5414 HValue* global_object() { return OperandAt(1); } |
5416 Handle<String> name() const { return name_; } | 5415 Handle<String> name() const { return name_; } |
5417 TypeofMode typeof_mode() const { return typeof_mode_; } | 5416 TypeofMode typeof_mode() const { return typeof_mode_; } |
5418 FeedbackVectorICSlot slot() const { return slot_; } | 5417 FeedbackVectorSlot slot() const { return slot_; } |
5419 Handle<TypeFeedbackVector> feedback_vector() const { | 5418 Handle<TypeFeedbackVector> feedback_vector() const { |
5420 return feedback_vector_; | 5419 return feedback_vector_; |
5421 } | 5420 } |
5422 bool HasVectorAndSlot() const { return true; } | 5421 bool HasVectorAndSlot() const { return true; } |
5423 void SetVectorAndSlot(Handle<TypeFeedbackVector> vector, | 5422 void SetVectorAndSlot(Handle<TypeFeedbackVector> vector, |
5424 FeedbackVectorICSlot slot) { | 5423 FeedbackVectorSlot slot) { |
5425 feedback_vector_ = vector; | 5424 feedback_vector_ = vector; |
5426 slot_ = slot; | 5425 slot_ = slot; |
5427 } | 5426 } |
5428 | 5427 |
5429 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT | 5428 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT |
5430 | 5429 |
5431 Representation RequiredInputRepresentation(int index) override { | 5430 Representation RequiredInputRepresentation(int index) override { |
5432 return Representation::Tagged(); | 5431 return Representation::Tagged(); |
5433 } | 5432 } |
5434 | 5433 |
5435 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric) | 5434 DECLARE_CONCRETE_INSTRUCTION(LoadGlobalGeneric) |
5436 | 5435 |
5437 private: | 5436 private: |
5438 HLoadGlobalGeneric(HValue* context, HValue* global_object, | 5437 HLoadGlobalGeneric(HValue* context, HValue* global_object, |
5439 Handle<String> name, TypeofMode typeof_mode) | 5438 Handle<String> name, TypeofMode typeof_mode) |
5440 : name_(name), | 5439 : name_(name), typeof_mode_(typeof_mode) { |
5441 typeof_mode_(typeof_mode), | |
5442 slot_(FeedbackVectorICSlot::Invalid()) { | |
5443 SetOperandAt(0, context); | 5440 SetOperandAt(0, context); |
5444 SetOperandAt(1, global_object); | 5441 SetOperandAt(1, global_object); |
5445 set_representation(Representation::Tagged()); | 5442 set_representation(Representation::Tagged()); |
5446 SetAllSideEffects(); | 5443 SetAllSideEffects(); |
5447 } | 5444 } |
5448 | 5445 |
5449 Handle<String> name_; | 5446 Handle<String> name_; |
5450 TypeofMode typeof_mode_; | 5447 TypeofMode typeof_mode_; |
5451 Handle<TypeFeedbackVector> feedback_vector_; | 5448 Handle<TypeFeedbackVector> feedback_vector_; |
5452 FeedbackVectorICSlot slot_; | 5449 FeedbackVectorSlot slot_; |
5453 }; | 5450 }; |
5454 | 5451 |
5455 | 5452 |
5456 class HLoadGlobalViaContext final : public HTemplateInstruction<1> { | 5453 class HLoadGlobalViaContext final : public HTemplateInstruction<1> { |
5457 public: | 5454 public: |
5458 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HLoadGlobalViaContext, int, int); | 5455 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P2(HLoadGlobalViaContext, int, int); |
5459 | 5456 |
5460 HValue* context() { return OperandAt(0); } | 5457 HValue* context() { return OperandAt(0); } |
5461 int depth() const { return depth_; } | 5458 int depth() const { return depth_; } |
5462 int slot_index() const { return slot_index_; } | 5459 int slot_index() const { return slot_index_; } |
(...skipping 1005 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6468 Handle<Name>, LanguageMode, | 6465 Handle<Name>, LanguageMode, |
6469 InlineCacheState); | 6466 InlineCacheState); |
6470 | 6467 |
6471 HValue* context() const { return OperandAt(0); } | 6468 HValue* context() const { return OperandAt(0); } |
6472 HValue* object() const { return OperandAt(1); } | 6469 HValue* object() const { return OperandAt(1); } |
6473 Handle<Name> name() const { return name_; } | 6470 Handle<Name> name() const { return name_; } |
6474 | 6471 |
6475 InlineCacheState initialization_state() const { | 6472 InlineCacheState initialization_state() const { |
6476 return initialization_state_; | 6473 return initialization_state_; |
6477 } | 6474 } |
6478 FeedbackVectorICSlot slot() const { return slot_; } | 6475 FeedbackVectorSlot slot() const { return slot_; } |
6479 Handle<TypeFeedbackVector> feedback_vector() const { | 6476 Handle<TypeFeedbackVector> feedback_vector() const { |
6480 return feedback_vector_; | 6477 return feedback_vector_; |
6481 } | 6478 } |
6482 bool HasVectorAndSlot() const { return true; } | 6479 bool HasVectorAndSlot() const { return true; } |
6483 void SetVectorAndSlot(Handle<TypeFeedbackVector> vector, | 6480 void SetVectorAndSlot(Handle<TypeFeedbackVector> vector, |
6484 FeedbackVectorICSlot slot) { | 6481 FeedbackVectorSlot slot) { |
6485 feedback_vector_ = vector; | 6482 feedback_vector_ = vector; |
6486 slot_ = slot; | 6483 slot_ = slot; |
6487 } | 6484 } |
6488 | 6485 |
6489 Representation RequiredInputRepresentation(int index) override { | 6486 Representation RequiredInputRepresentation(int index) override { |
6490 return Representation::Tagged(); | 6487 return Representation::Tagged(); |
6491 } | 6488 } |
6492 | 6489 |
6493 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT | 6490 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT |
6494 | 6491 |
6495 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric) | 6492 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric) |
6496 | 6493 |
6497 LanguageMode language_mode() const { return language_mode_; } | 6494 LanguageMode language_mode() const { return language_mode_; } |
6498 | 6495 |
6499 private: | 6496 private: |
6500 HLoadNamedGeneric(HValue* context, HValue* object, Handle<Name> name, | 6497 HLoadNamedGeneric(HValue* context, HValue* object, Handle<Name> name, |
6501 LanguageMode language_mode, | 6498 LanguageMode language_mode, |
6502 InlineCacheState initialization_state) | 6499 InlineCacheState initialization_state) |
6503 : name_(name), | 6500 : name_(name), |
6504 slot_(FeedbackVectorICSlot::Invalid()), | |
6505 language_mode_(language_mode), | 6501 language_mode_(language_mode), |
6506 initialization_state_(initialization_state) { | 6502 initialization_state_(initialization_state) { |
6507 SetOperandAt(0, context); | 6503 SetOperandAt(0, context); |
6508 SetOperandAt(1, object); | 6504 SetOperandAt(1, object); |
6509 set_representation(Representation::Tagged()); | 6505 set_representation(Representation::Tagged()); |
6510 SetAllSideEffects(); | 6506 SetAllSideEffects(); |
6511 } | 6507 } |
6512 | 6508 |
6513 Handle<Name> name_; | 6509 Handle<Name> name_; |
6514 Handle<TypeFeedbackVector> feedback_vector_; | 6510 Handle<TypeFeedbackVector> feedback_vector_; |
6515 FeedbackVectorICSlot slot_; | 6511 FeedbackVectorSlot slot_; |
6516 LanguageMode language_mode_; | 6512 LanguageMode language_mode_; |
6517 InlineCacheState initialization_state_; | 6513 InlineCacheState initialization_state_; |
6518 }; | 6514 }; |
6519 | 6515 |
6520 | 6516 |
6521 class HLoadFunctionPrototype final : public HUnaryOperation { | 6517 class HLoadFunctionPrototype final : public HUnaryOperation { |
6522 public: | 6518 public: |
6523 DECLARE_INSTRUCTION_FACTORY_P1(HLoadFunctionPrototype, HValue*); | 6519 DECLARE_INSTRUCTION_FACTORY_P1(HLoadFunctionPrototype, HValue*); |
6524 | 6520 |
6525 HValue* function() { return OperandAt(0); } | 6521 HValue* function() { return OperandAt(0); } |
(...skipping 220 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6746 public: | 6742 public: |
6747 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HLoadKeyedGeneric, HValue*, | 6743 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HLoadKeyedGeneric, HValue*, |
6748 HValue*, LanguageMode, | 6744 HValue*, LanguageMode, |
6749 InlineCacheState); | 6745 InlineCacheState); |
6750 HValue* object() const { return OperandAt(0); } | 6746 HValue* object() const { return OperandAt(0); } |
6751 HValue* key() const { return OperandAt(1); } | 6747 HValue* key() const { return OperandAt(1); } |
6752 HValue* context() const { return OperandAt(2); } | 6748 HValue* context() const { return OperandAt(2); } |
6753 InlineCacheState initialization_state() const { | 6749 InlineCacheState initialization_state() const { |
6754 return initialization_state_; | 6750 return initialization_state_; |
6755 } | 6751 } |
6756 FeedbackVectorICSlot slot() const { return slot_; } | 6752 FeedbackVectorSlot slot() const { return slot_; } |
6757 Handle<TypeFeedbackVector> feedback_vector() const { | 6753 Handle<TypeFeedbackVector> feedback_vector() const { |
6758 return feedback_vector_; | 6754 return feedback_vector_; |
6759 } | 6755 } |
6760 bool HasVectorAndSlot() const { | 6756 bool HasVectorAndSlot() const { |
6761 DCHECK(initialization_state_ == MEGAMORPHIC || !feedback_vector_.is_null()); | 6757 DCHECK(initialization_state_ == MEGAMORPHIC || !feedback_vector_.is_null()); |
6762 return !feedback_vector_.is_null(); | 6758 return !feedback_vector_.is_null(); |
6763 } | 6759 } |
6764 void SetVectorAndSlot(Handle<TypeFeedbackVector> vector, | 6760 void SetVectorAndSlot(Handle<TypeFeedbackVector> vector, |
6765 FeedbackVectorICSlot slot) { | 6761 FeedbackVectorSlot slot) { |
6766 feedback_vector_ = vector; | 6762 feedback_vector_ = vector; |
6767 slot_ = slot; | 6763 slot_ = slot; |
6768 } | 6764 } |
6769 | 6765 |
6770 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT | 6766 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT |
6771 | 6767 |
6772 Representation RequiredInputRepresentation(int index) override { | 6768 Representation RequiredInputRepresentation(int index) override { |
6773 // tagged[tagged] | 6769 // tagged[tagged] |
6774 return Representation::Tagged(); | 6770 return Representation::Tagged(); |
6775 } | 6771 } |
6776 | 6772 |
6777 HValue* Canonicalize() override; | 6773 HValue* Canonicalize() override; |
6778 | 6774 |
6779 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric) | 6775 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric) |
6780 | 6776 |
6781 LanguageMode language_mode() const { return language_mode_; } | 6777 LanguageMode language_mode() const { return language_mode_; } |
6782 | 6778 |
6783 private: | 6779 private: |
6784 HLoadKeyedGeneric(HValue* context, HValue* obj, HValue* key, | 6780 HLoadKeyedGeneric(HValue* context, HValue* obj, HValue* key, |
6785 LanguageMode language_mode, | 6781 LanguageMode language_mode, |
6786 InlineCacheState initialization_state) | 6782 InlineCacheState initialization_state) |
6787 : slot_(FeedbackVectorICSlot::Invalid()), | 6783 : initialization_state_(initialization_state), |
6788 initialization_state_(initialization_state), | |
6789 language_mode_(language_mode) { | 6784 language_mode_(language_mode) { |
6790 set_representation(Representation::Tagged()); | 6785 set_representation(Representation::Tagged()); |
6791 SetOperandAt(0, obj); | 6786 SetOperandAt(0, obj); |
6792 SetOperandAt(1, key); | 6787 SetOperandAt(1, key); |
6793 SetOperandAt(2, context); | 6788 SetOperandAt(2, context); |
6794 SetAllSideEffects(); | 6789 SetAllSideEffects(); |
6795 } | 6790 } |
6796 | 6791 |
6797 Handle<TypeFeedbackVector> feedback_vector_; | 6792 Handle<TypeFeedbackVector> feedback_vector_; |
6798 FeedbackVectorICSlot slot_; | 6793 FeedbackVectorSlot slot_; |
6799 InlineCacheState initialization_state_; | 6794 InlineCacheState initialization_state_; |
6800 LanguageMode language_mode_; | 6795 LanguageMode language_mode_; |
6801 }; | 6796 }; |
6802 | 6797 |
6803 | 6798 |
6804 // Indicates whether the store is a store to an entry that was previously | 6799 // Indicates whether the store is a store to an entry that was previously |
6805 // initialized or not. | 6800 // initialized or not. |
6806 enum StoreFieldOrKeyedMode { | 6801 enum StoreFieldOrKeyedMode { |
6807 // The entry could be either previously initialized or not. | 6802 // The entry could be either previously initialized or not. |
6808 INITIALIZING_STORE, | 6803 INITIALIZING_STORE, |
(...skipping 164 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6973 InlineCacheState initialization_state() const { | 6968 InlineCacheState initialization_state() const { |
6974 return initialization_state_; | 6969 return initialization_state_; |
6975 } | 6970 } |
6976 | 6971 |
6977 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT | 6972 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT |
6978 | 6973 |
6979 Representation RequiredInputRepresentation(int index) override { | 6974 Representation RequiredInputRepresentation(int index) override { |
6980 return Representation::Tagged(); | 6975 return Representation::Tagged(); |
6981 } | 6976 } |
6982 | 6977 |
6983 FeedbackVectorICSlot slot() const { return slot_; } | 6978 FeedbackVectorSlot slot() const { return slot_; } |
6984 Handle<TypeFeedbackVector> feedback_vector() const { | 6979 Handle<TypeFeedbackVector> feedback_vector() const { |
6985 return feedback_vector_; | 6980 return feedback_vector_; |
6986 } | 6981 } |
6987 bool HasVectorAndSlot() const { return FLAG_vector_stores; } | 6982 bool HasVectorAndSlot() const { return FLAG_vector_stores; } |
6988 void SetVectorAndSlot(Handle<TypeFeedbackVector> vector, | 6983 void SetVectorAndSlot(Handle<TypeFeedbackVector> vector, |
6989 FeedbackVectorICSlot slot) { | 6984 FeedbackVectorSlot slot) { |
6990 feedback_vector_ = vector; | 6985 feedback_vector_ = vector; |
6991 slot_ = slot; | 6986 slot_ = slot; |
6992 } | 6987 } |
6993 | 6988 |
6994 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric) | 6989 DECLARE_CONCRETE_INSTRUCTION(StoreNamedGeneric) |
6995 | 6990 |
6996 private: | 6991 private: |
6997 HStoreNamedGeneric(HValue* context, HValue* object, Handle<Name> name, | 6992 HStoreNamedGeneric(HValue* context, HValue* object, Handle<Name> name, |
6998 HValue* value, LanguageMode language_mode, | 6993 HValue* value, LanguageMode language_mode, |
6999 InlineCacheState initialization_state) | 6994 InlineCacheState initialization_state) |
7000 : name_(name), | 6995 : name_(name), |
7001 slot_(FeedbackVectorICSlot::Invalid()), | |
7002 language_mode_(language_mode), | 6996 language_mode_(language_mode), |
7003 initialization_state_(initialization_state) { | 6997 initialization_state_(initialization_state) { |
7004 SetOperandAt(0, object); | 6998 SetOperandAt(0, object); |
7005 SetOperandAt(1, value); | 6999 SetOperandAt(1, value); |
7006 SetOperandAt(2, context); | 7000 SetOperandAt(2, context); |
7007 SetAllSideEffects(); | 7001 SetAllSideEffects(); |
7008 } | 7002 } |
7009 | 7003 |
7010 Handle<Name> name_; | 7004 Handle<Name> name_; |
7011 Handle<TypeFeedbackVector> feedback_vector_; | 7005 Handle<TypeFeedbackVector> feedback_vector_; |
7012 FeedbackVectorICSlot slot_; | 7006 FeedbackVectorSlot slot_; |
7013 LanguageMode language_mode_; | 7007 LanguageMode language_mode_; |
7014 InlineCacheState initialization_state_; | 7008 InlineCacheState initialization_state_; |
7015 }; | 7009 }; |
7016 | 7010 |
7017 | 7011 |
7018 class HStoreGlobalViaContext final : public HTemplateInstruction<2> { | 7012 class HStoreGlobalViaContext final : public HTemplateInstruction<2> { |
7019 public: | 7013 public: |
7020 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HStoreGlobalViaContext, HValue*, | 7014 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HStoreGlobalViaContext, HValue*, |
7021 int, int, LanguageMode); | 7015 int, int, LanguageMode); |
7022 HValue* context() const { return OperandAt(0); } | 7016 HValue* context() const { return OperandAt(0); } |
(...skipping 209 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7232 LanguageMode language_mode() const { return language_mode_; } | 7226 LanguageMode language_mode() const { return language_mode_; } |
7233 InlineCacheState initialization_state() const { | 7227 InlineCacheState initialization_state() const { |
7234 return initialization_state_; | 7228 return initialization_state_; |
7235 } | 7229 } |
7236 | 7230 |
7237 Representation RequiredInputRepresentation(int index) override { | 7231 Representation RequiredInputRepresentation(int index) override { |
7238 // tagged[tagged] = tagged | 7232 // tagged[tagged] = tagged |
7239 return Representation::Tagged(); | 7233 return Representation::Tagged(); |
7240 } | 7234 } |
7241 | 7235 |
7242 FeedbackVectorICSlot slot() const { return slot_; } | 7236 FeedbackVectorSlot slot() const { return slot_; } |
7243 Handle<TypeFeedbackVector> feedback_vector() const { | 7237 Handle<TypeFeedbackVector> feedback_vector() const { |
7244 return feedback_vector_; | 7238 return feedback_vector_; |
7245 } | 7239 } |
7246 bool HasVectorAndSlot() const { | 7240 bool HasVectorAndSlot() const { |
7247 DCHECK(!(FLAG_vector_stores && initialization_state_ != MEGAMORPHIC) || | 7241 DCHECK(!(FLAG_vector_stores && initialization_state_ != MEGAMORPHIC) || |
7248 !feedback_vector_.is_null()); | 7242 !feedback_vector_.is_null()); |
7249 return !feedback_vector_.is_null(); | 7243 return !feedback_vector_.is_null(); |
7250 } | 7244 } |
7251 void SetVectorAndSlot(Handle<TypeFeedbackVector> vector, | 7245 void SetVectorAndSlot(Handle<TypeFeedbackVector> vector, |
7252 FeedbackVectorICSlot slot) { | 7246 FeedbackVectorSlot slot) { |
7253 feedback_vector_ = vector; | 7247 feedback_vector_ = vector; |
7254 slot_ = slot; | 7248 slot_ = slot; |
7255 } | 7249 } |
7256 | 7250 |
7257 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT | 7251 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT |
7258 | 7252 |
7259 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric) | 7253 DECLARE_CONCRETE_INSTRUCTION(StoreKeyedGeneric) |
7260 | 7254 |
7261 private: | 7255 private: |
7262 HStoreKeyedGeneric(HValue* context, HValue* object, HValue* key, | 7256 HStoreKeyedGeneric(HValue* context, HValue* object, HValue* key, |
7263 HValue* value, LanguageMode language_mode, | 7257 HValue* value, LanguageMode language_mode, |
7264 InlineCacheState initialization_state) | 7258 InlineCacheState initialization_state) |
7265 : slot_(FeedbackVectorICSlot::Invalid()), | 7259 : language_mode_(language_mode), |
7266 language_mode_(language_mode), | |
7267 initialization_state_(initialization_state) { | 7260 initialization_state_(initialization_state) { |
7268 SetOperandAt(0, object); | 7261 SetOperandAt(0, object); |
7269 SetOperandAt(1, key); | 7262 SetOperandAt(1, key); |
7270 SetOperandAt(2, value); | 7263 SetOperandAt(2, value); |
7271 SetOperandAt(3, context); | 7264 SetOperandAt(3, context); |
7272 SetAllSideEffects(); | 7265 SetAllSideEffects(); |
7273 } | 7266 } |
7274 | 7267 |
7275 Handle<TypeFeedbackVector> feedback_vector_; | 7268 Handle<TypeFeedbackVector> feedback_vector_; |
7276 FeedbackVectorICSlot slot_; | 7269 FeedbackVectorSlot slot_; |
7277 LanguageMode language_mode_; | 7270 LanguageMode language_mode_; |
7278 InlineCacheState initialization_state_; | 7271 InlineCacheState initialization_state_; |
7279 }; | 7272 }; |
7280 | 7273 |
7281 | 7274 |
7282 class HTransitionElementsKind final : public HTemplateInstruction<2> { | 7275 class HTransitionElementsKind final : public HTemplateInstruction<2> { |
7283 public: | 7276 public: |
7284 inline static HTransitionElementsKind* New(Isolate* isolate, Zone* zone, | 7277 inline static HTransitionElementsKind* New(Isolate* isolate, Zone* zone, |
7285 HValue* context, HValue* object, | 7278 HValue* context, HValue* object, |
7286 Handle<Map> original_map, | 7279 Handle<Map> original_map, |
(...skipping 693 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
7980 | 7973 |
7981 | 7974 |
7982 | 7975 |
7983 #undef DECLARE_INSTRUCTION | 7976 #undef DECLARE_INSTRUCTION |
7984 #undef DECLARE_CONCRETE_INSTRUCTION | 7977 #undef DECLARE_CONCRETE_INSTRUCTION |
7985 | 7978 |
7986 } // namespace internal | 7979 } // namespace internal |
7987 } // namespace v8 | 7980 } // namespace v8 |
7988 | 7981 |
7989 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7982 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
OLD | NEW |