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

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

Issue 1199983002: [strong] Implement strong property access semantics (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: add TODOs Created 5 years, 5 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
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/builtins-ia32.cc » ('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 // 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 6391 matching lines...) Expand 10 before | Expand all | Expand 10 after
6402 6402
6403 bool IsDeletable() const override { return true; } 6403 bool IsDeletable() const override { return true; }
6404 6404
6405 HObjectAccess access_; 6405 HObjectAccess access_;
6406 const UniqueSet<Map>* maps_; 6406 const UniqueSet<Map>* maps_;
6407 }; 6407 };
6408 6408
6409 6409
6410 class HLoadNamedGeneric final : public HTemplateInstruction<2> { 6410 class HLoadNamedGeneric final : public HTemplateInstruction<2> {
6411 public: 6411 public:
6412 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HLoadNamedGeneric, HValue*, 6412 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HLoadNamedGeneric, HValue*,
6413 Handle<Name>, InlineCacheState); 6413 Handle<Name>, LanguageMode,
6414 InlineCacheState);
6414 6415
6415 HValue* context() const { return OperandAt(0); } 6416 HValue* context() const { return OperandAt(0); }
6416 HValue* object() const { return OperandAt(1); } 6417 HValue* object() const { return OperandAt(1); }
6417 Handle<Name> name() const { return name_; } 6418 Handle<Name> name() const { return name_; }
6418 6419
6419 InlineCacheState initialization_state() const { 6420 InlineCacheState initialization_state() const {
6420 return initialization_state_; 6421 return initialization_state_;
6421 } 6422 }
6422 FeedbackVectorICSlot slot() const { return slot_; } 6423 FeedbackVectorICSlot slot() const { return slot_; }
6423 Handle<TypeFeedbackVector> feedback_vector() const { 6424 Handle<TypeFeedbackVector> feedback_vector() const {
6424 return feedback_vector_; 6425 return feedback_vector_;
6425 } 6426 }
6426 bool HasVectorAndSlot() const { return true; } 6427 bool HasVectorAndSlot() const { return true; }
6427 void SetVectorAndSlot(Handle<TypeFeedbackVector> vector, 6428 void SetVectorAndSlot(Handle<TypeFeedbackVector> vector,
6428 FeedbackVectorICSlot slot) { 6429 FeedbackVectorICSlot slot) {
6429 feedback_vector_ = vector; 6430 feedback_vector_ = vector;
6430 slot_ = slot; 6431 slot_ = slot;
6431 } 6432 }
6432 6433
6433 Representation RequiredInputRepresentation(int index) override { 6434 Representation RequiredInputRepresentation(int index) override {
6434 return Representation::Tagged(); 6435 return Representation::Tagged();
6435 } 6436 }
6436 6437
6437 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT 6438 std::ostream& PrintDataTo(std::ostream& os) const override; // NOLINT
6438 6439
6439 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric) 6440 DECLARE_CONCRETE_INSTRUCTION(LoadNamedGeneric)
6440 6441
6442 LanguageMode language_mode() const { return language_mode_; }
6443
6441 private: 6444 private:
6442 HLoadNamedGeneric(HValue* context, HValue* object, Handle<Name> name, 6445 HLoadNamedGeneric(HValue* context, HValue* object, Handle<Name> name,
6446 LanguageMode language_mode,
6443 InlineCacheState initialization_state) 6447 InlineCacheState initialization_state)
6444 : name_(name), 6448 : name_(name),
6445 slot_(FeedbackVectorICSlot::Invalid()), 6449 slot_(FeedbackVectorICSlot::Invalid()),
6450 language_mode_(language_mode),
6446 initialization_state_(initialization_state) { 6451 initialization_state_(initialization_state) {
6447 SetOperandAt(0, context); 6452 SetOperandAt(0, context);
6448 SetOperandAt(1, object); 6453 SetOperandAt(1, object);
6449 set_representation(Representation::Tagged()); 6454 set_representation(Representation::Tagged());
6450 SetAllSideEffects(); 6455 SetAllSideEffects();
6451 } 6456 }
6452 6457
6453 Handle<Name> name_; 6458 Handle<Name> name_;
6454 Handle<TypeFeedbackVector> feedback_vector_; 6459 Handle<TypeFeedbackVector> feedback_vector_;
6455 FeedbackVectorICSlot slot_; 6460 FeedbackVectorICSlot slot_;
6461 LanguageMode language_mode_;
6456 InlineCacheState initialization_state_; 6462 InlineCacheState initialization_state_;
6457 }; 6463 };
6458 6464
6459 6465
6460 class HLoadFunctionPrototype final : public HUnaryOperation { 6466 class HLoadFunctionPrototype final : public HUnaryOperation {
6461 public: 6467 public:
6462 DECLARE_INSTRUCTION_FACTORY_P1(HLoadFunctionPrototype, HValue*); 6468 DECLARE_INSTRUCTION_FACTORY_P1(HLoadFunctionPrototype, HValue*);
6463 6469
6464 HValue* function() { return OperandAt(0); } 6470 HValue* function() { return OperandAt(0); }
6465 6471
(...skipping 219 matching lines...) Expand 10 before | Expand all | Expand 10 after
6685 {}; // NOLINT 6691 {}; // NOLINT
6686 class IsDehoistedField: 6692 class IsDehoistedField:
6687 public BitField<bool, kStartIsDehoisted, kBitsForIsDehoisted> 6693 public BitField<bool, kStartIsDehoisted, kBitsForIsDehoisted>
6688 {}; // NOLINT 6694 {}; // NOLINT
6689 uint32_t bit_field_; 6695 uint32_t bit_field_;
6690 }; 6696 };
6691 6697
6692 6698
6693 class HLoadKeyedGeneric final : public HTemplateInstruction<3> { 6699 class HLoadKeyedGeneric final : public HTemplateInstruction<3> {
6694 public: 6700 public:
6695 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P3(HLoadKeyedGeneric, HValue*, 6701 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HLoadKeyedGeneric, HValue*,
6696 HValue*, InlineCacheState); 6702 HValue*, LanguageMode,
6703 InlineCacheState);
6697 HValue* object() const { return OperandAt(0); } 6704 HValue* object() const { return OperandAt(0); }
6698 HValue* key() const { return OperandAt(1); } 6705 HValue* key() const { return OperandAt(1); }
6699 HValue* context() const { return OperandAt(2); } 6706 HValue* context() const { return OperandAt(2); }
6700 InlineCacheState initialization_state() const { 6707 InlineCacheState initialization_state() const {
6701 return initialization_state_; 6708 return initialization_state_;
6702 } 6709 }
6703 FeedbackVectorICSlot slot() const { return slot_; } 6710 FeedbackVectorICSlot slot() const { return slot_; }
6704 Handle<TypeFeedbackVector> feedback_vector() const { 6711 Handle<TypeFeedbackVector> feedback_vector() const {
6705 return feedback_vector_; 6712 return feedback_vector_;
6706 } 6713 }
(...skipping 11 matching lines...) Expand all
6718 6725
6719 Representation RequiredInputRepresentation(int index) override { 6726 Representation RequiredInputRepresentation(int index) override {
6720 // tagged[tagged] 6727 // tagged[tagged]
6721 return Representation::Tagged(); 6728 return Representation::Tagged();
6722 } 6729 }
6723 6730
6724 HValue* Canonicalize() override; 6731 HValue* Canonicalize() override;
6725 6732
6726 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric) 6733 DECLARE_CONCRETE_INSTRUCTION(LoadKeyedGeneric)
6727 6734
6735 LanguageMode language_mode() const { return language_mode_; }
6736
6728 private: 6737 private:
6729 HLoadKeyedGeneric(HValue* context, HValue* obj, HValue* key, 6738 HLoadKeyedGeneric(HValue* context, HValue* obj, HValue* key,
6739 LanguageMode language_mode,
6730 InlineCacheState initialization_state) 6740 InlineCacheState initialization_state)
6731 : slot_(FeedbackVectorICSlot::Invalid()), 6741 : slot_(FeedbackVectorICSlot::Invalid()),
6732 initialization_state_(initialization_state) { 6742 initialization_state_(initialization_state),
6743 language_mode_(language_mode) {
6733 set_representation(Representation::Tagged()); 6744 set_representation(Representation::Tagged());
6734 SetOperandAt(0, obj); 6745 SetOperandAt(0, obj);
6735 SetOperandAt(1, key); 6746 SetOperandAt(1, key);
6736 SetOperandAt(2, context); 6747 SetOperandAt(2, context);
6737 SetAllSideEffects(); 6748 SetAllSideEffects();
6738 } 6749 }
6739 6750
6740 Handle<TypeFeedbackVector> feedback_vector_; 6751 Handle<TypeFeedbackVector> feedback_vector_;
6741 FeedbackVectorICSlot slot_; 6752 FeedbackVectorICSlot slot_;
6742 InlineCacheState initialization_state_; 6753 InlineCacheState initialization_state_;
6754 LanguageMode language_mode_;
6743 }; 6755 };
6744 6756
6745 6757
6746 // Indicates whether the store is a store to an entry that was previously 6758 // Indicates whether the store is a store to an entry that was previously
6747 // initialized or not. 6759 // initialized or not.
6748 enum StoreFieldOrKeyedMode { 6760 enum StoreFieldOrKeyedMode {
6749 // The entry could be either previously initialized or not. 6761 // The entry could be either previously initialized or not.
6750 INITIALIZING_STORE, 6762 INITIALIZING_STORE,
6751 // At the time of this store it is guaranteed that the entry is already 6763 // At the time of this store it is guaranteed that the entry is already
6752 // initialized. 6764 // initialized.
(...skipping 1193 matching lines...) Expand 10 before | Expand all | Expand 10 after
7946 }; 7958 };
7947 7959
7948 7960
7949 7961
7950 #undef DECLARE_INSTRUCTION 7962 #undef DECLARE_INSTRUCTION
7951 #undef DECLARE_CONCRETE_INSTRUCTION 7963 #undef DECLARE_CONCRETE_INSTRUCTION
7952 7964
7953 } } // namespace v8::internal 7965 } } // namespace v8::internal
7954 7966
7955 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ 7967 #endif // V8_HYDROGEN_INSTRUCTIONS_H_
OLDNEW
« no previous file with comments | « src/hydrogen.cc ('k') | src/ia32/builtins-ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698