| 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 6305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6316 | 6316 |
| 6317 bool IsDeletable() const override { return true; } | 6317 bool IsDeletable() const override { return true; } |
| 6318 | 6318 |
| 6319 HObjectAccess access_; | 6319 HObjectAccess access_; |
| 6320 const UniqueSet<Map>* maps_; | 6320 const UniqueSet<Map>* maps_; |
| 6321 }; | 6321 }; |
| 6322 | 6322 |
| 6323 | 6323 |
| 6324 class HLoadNamedGeneric final : public HTemplateInstruction<2> { | 6324 class HLoadNamedGeneric final : public HTemplateInstruction<2> { |
| 6325 public: | 6325 public: |
| 6326 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HLoadNamedGeneric, HValue*, | 6326 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HLoadNamedGeneric, HValue*, |
| 6327 Handle<Name>, LanguageMode, | 6327 Handle<Name>, InlineCacheState); |
| 6328 InlineCacheState); | |
| 6329 | 6328 |
| 6330 HValue* context() const { return OperandAt(0); } | 6329 HValue* context() const { return OperandAt(0); } |
| 6331 HValue* object() const { return OperandAt(1); } | 6330 HValue* object() const { return OperandAt(1); } |
| 6332 Handle<Name> name() const { return name_; } | 6331 Handle<Name> name() const { return name_; } |
| 6333 | 6332 |
| 6334 InlineCacheState initialization_state() const { | 6333 InlineCacheState initialization_state() const { |
| 6335 return initialization_state_; | 6334 return initialization_state_; |
| 6336 } | 6335 } |
| 6337 FeedbackVectorSlot slot() const { return slot_; } | 6336 FeedbackVectorSlot slot() const { return slot_; } |
| 6338 Handle<TypeFeedbackVector> feedback_vector() const { | 6337 Handle<TypeFeedbackVector> feedback_vector() const { |
| 6339 return feedback_vector_; | 6338 return feedback_vector_; |
| 6340 } | 6339 } |
| 6341 bool HasVectorAndSlot() const { return true; } | 6340 bool HasVectorAndSlot() const { return true; } |
| 6342 void SetVectorAndSlot(Handle<TypeFeedbackVector> vector, | 6341 void SetVectorAndSlot(Handle<TypeFeedbackVector> vector, |
| 6343 FeedbackVectorSlot slot) { | 6342 FeedbackVectorSlot slot) { |
| 6344 feedback_vector_ = vector; | 6343 feedback_vector_ = vector; |
| 6345 slot_ = slot; | 6344 slot_ = slot; |
| 6346 } | 6345 } |
| 6347 | 6346 |
| 6348 Representation RequiredInputRepresentation(int index) override { | 6347 Representation RequiredInputRepresentation(int index) override { |
| 6349 return Representation::Tagged(); | 6348 return Representation::Tagged(); |
| 6350 } | 6349 } |
| 6351 | 6350 |
| 6352 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT | 6351 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT |
| 6353 | 6352 |
| 6354 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric) | 6353 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric) |
| 6355 | 6354 |
| 6356 LanguageMode language_mode() const { return language_mode_; } | |
| 6357 | |
| 6358 private: | 6355 private: |
| 6359 HLoadNamedGeneric(HValue* context, HValue* object, Handle<Name> name, | 6356 HLoadNamedGeneric(HValue* context, HValue* object, Handle<Name> name, |
| 6360 LanguageMode language_mode, | |
| 6361 InlineCacheState initialization_state) | 6357 InlineCacheState initialization_state) |
| 6362 : name_(name), | 6358 : name_(name), |
| 6363 language_mode_(language_mode), | |
| 6364 initialization_state_(initialization_state) { | 6359 initialization_state_(initialization_state) { |
| 6365 SetOperandAt(0, context); | 6360 SetOperandAt(0, context); |
| 6366 SetOperandAt(1, object); | 6361 SetOperandAt(1, object); |
| 6367 set_representation(Representation::Tagged()); | 6362 set_representation(Representation::Tagged()); |
| 6368 SetAllSideEffects(); | 6363 SetAllSideEffects(); |
| 6369 } | 6364 } |
| 6370 | 6365 |
| 6371 Handle<Name> name_; | 6366 Handle<Name> name_; |
| 6372 Handle<TypeFeedbackVector> feedback_vector_; | 6367 Handle<TypeFeedbackVector> feedback_vector_; |
| 6373 FeedbackVectorSlot slot_; | 6368 FeedbackVectorSlot slot_; |
| 6374 LanguageMode language_mode_; | |
| 6375 InlineCacheState initialization_state_; | 6369 InlineCacheState initialization_state_; |
| 6376 }; | 6370 }; |
| 6377 | 6371 |
| 6378 | 6372 |
| 6379 class HLoadFunctionPrototype final : public HUnaryOperation { | 6373 class HLoadFunctionPrototype final : public HUnaryOperation { |
| 6380 public: | 6374 public: |
| 6381 DECLARE_INSTRUCTION_FACTORY_P1(HLoadFunctionPrototype, HValue*); | 6375 DECLARE_INSTRUCTION_FACTORY_P1(HLoadFunctionPrototype, HValue*); |
| 6382 | 6376 |
| 6383 HValue* function() { return OperandAt(0); } | 6377 HValue* function() { return OperandAt(0); } |
| 6384 | 6378 |
| (...skipping 222 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6607 {}; // NOLINT | 6601 {}; // NOLINT |
| 6608 class IsDehoistedField: | 6602 class IsDehoistedField: |
| 6609 public BitField<bool, kStartIsDehoisted, kBitsForIsDehoisted> | 6603 public BitField<bool, kStartIsDehoisted, kBitsForIsDehoisted> |
| 6610 {}; // NOLINT | 6604 {}; // NOLINT |
| 6611 uint32_t bit_field_; | 6605 uint32_t bit_field_; |
| 6612 }; | 6606 }; |
| 6613 | 6607 |
| 6614 | 6608 |
| 6615 class HLoadKeyedGeneric final : public HTemplateInstruction<3> { | 6609 class HLoadKeyedGeneric final : public HTemplateInstruction<3> { |
| 6616 public: | 6610 public: |
| 6617 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HLoadKeyedGeneric, HValue*, | 6611 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HLoadKeyedGeneric, HValue*, |
| 6618 HValue*, LanguageMode, | 6612 HValue*, InlineCacheState); |
| 6619 InlineCacheState); | |
| 6620 HValue* object() const { return OperandAt(0); } | 6613 HValue* object() const { return OperandAt(0); } |
| 6621 HValue* key() const { return OperandAt(1); } | 6614 HValue* key() const { return OperandAt(1); } |
| 6622 HValue* context() const { return OperandAt(2); } | 6615 HValue* context() const { return OperandAt(2); } |
| 6623 InlineCacheState initialization_state() const { | 6616 InlineCacheState initialization_state() const { |
| 6624 return initialization_state_; | 6617 return initialization_state_; |
| 6625 } | 6618 } |
| 6626 FeedbackVectorSlot slot() const { return slot_; } | 6619 FeedbackVectorSlot slot() const { return slot_; } |
| 6627 Handle<TypeFeedbackVector> feedback_vector() const { | 6620 Handle<TypeFeedbackVector> feedback_vector() const { |
| 6628 return feedback_vector_; | 6621 return feedback_vector_; |
| 6629 } | 6622 } |
| (...skipping 11 matching lines...) Expand all Loading... |
| 6641 | 6634 |
| 6642 Representation RequiredInputRepresentation(int index) override { | 6635 Representation RequiredInputRepresentation(int index) override { |
| 6643 // tagged[tagged] | 6636 // tagged[tagged] |
| 6644 return Representation::Tagged(); | 6637 return Representation::Tagged(); |
| 6645 } | 6638 } |
| 6646 | 6639 |
| 6647 HValue* Canonicalize() override; | 6640 HValue* Canonicalize() override; |
| 6648 | 6641 |
| 6649 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric) | 6642 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric) |
| 6650 | 6643 |
| 6651 LanguageMode language_mode() const { return language_mode_; } | |
| 6652 | |
| 6653 private: | 6644 private: |
| 6654 HLoadKeyedGeneric(HValue* context, HValue* obj, HValue* key, | 6645 HLoadKeyedGeneric(HValue* context, HValue* obj, HValue* key, |
| 6655 LanguageMode language_mode, | |
| 6656 InlineCacheState initialization_state) | 6646 InlineCacheState initialization_state) |
| 6657 : initialization_state_(initialization_state), | 6647 : initialization_state_(initialization_state) { |
| 6658 language_mode_(language_mode) { | |
| 6659 set_representation(Representation::Tagged()); | 6648 set_representation(Representation::Tagged()); |
| 6660 SetOperandAt(0, obj); | 6649 SetOperandAt(0, obj); |
| 6661 SetOperandAt(1, key); | 6650 SetOperandAt(1, key); |
| 6662 SetOperandAt(2, context); | 6651 SetOperandAt(2, context); |
| 6663 SetAllSideEffects(); | 6652 SetAllSideEffects(); |
| 6664 } | 6653 } |
| 6665 | 6654 |
| 6666 Handle<TypeFeedbackVector> feedback_vector_; | 6655 Handle<TypeFeedbackVector> feedback_vector_; |
| 6667 FeedbackVectorSlot slot_; | 6656 FeedbackVectorSlot slot_; |
| 6668 InlineCacheState initialization_state_; | 6657 InlineCacheState initialization_state_; |
| 6669 LanguageMode language_mode_; | |
| 6670 }; | 6658 }; |
| 6671 | 6659 |
| 6672 | 6660 |
| 6673 // Indicates whether the store is a store to an entry that was previously | 6661 // Indicates whether the store is a store to an entry that was previously |
| 6674 // initialized or not. | 6662 // initialized or not. |
| 6675 enum StoreFieldOrKeyedMode { | 6663 enum StoreFieldOrKeyedMode { |
| 6676 // The entry could be either previously initialized or not. | 6664 // The entry could be either previously initialized or not. |
| 6677 INITIALIZING_STORE, | 6665 INITIALIZING_STORE, |
| 6678 // At the time of this store it is guaranteed that the entry is already | 6666 // At the time of this store it is guaranteed that the entry is already |
| 6679 // initialized. | 6667 // initialized. |
| (...skipping 1053 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7733 | 7721 |
| 7734 | 7722 |
| 7735 | 7723 |
| 7736 #undef DECLARE_INSTRUCTION | 7724 #undef DECLARE_INSTRUCTION |
| 7737 #undef DECLARE_CONCRETE_INSTRUCTION | 7725 #undef DECLARE_CONCRETE_INSTRUCTION |
| 7738 | 7726 |
| 7739 } // namespace internal | 7727 } // namespace internal |
| 7740 } // namespace v8 | 7728 } // namespace v8 |
| 7741 | 7729 |
| 7742 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ | 7730 #endif // V8_CRANKSHAFT_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |