| 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 <iosfwd> | 8 #include <iosfwd> |
| 9 | 9 |
| 10 #include "src/v8.h" | 10 #include "src/v8.h" |
| (...skipping 6788 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6799 SetOperandAt(2, context); | 6799 SetOperandAt(2, context); |
| 6800 SetAllSideEffects(); | 6800 SetAllSideEffects(); |
| 6801 } | 6801 } |
| 6802 | 6802 |
| 6803 Handle<TypeFeedbackVector> feedback_vector_; | 6803 Handle<TypeFeedbackVector> feedback_vector_; |
| 6804 FeedbackVectorICSlot slot_; | 6804 FeedbackVectorICSlot slot_; |
| 6805 }; | 6805 }; |
| 6806 | 6806 |
| 6807 | 6807 |
| 6808 // Indicates whether the store is a store to an entry that was previously | 6808 // Indicates whether the store is a store to an entry that was previously |
| 6809 // initialized or not. | 6809 // initialized or not. Force this enum into an unsigned char to make it |
| 6810 enum StoreFieldOrKeyedMode { | 6810 // take less space. |
| 6811 enum StoreFieldOrKeyedMode : unsigned char { |
| 6811 // The entry could be either previously initialized or not. | 6812 // The entry could be either previously initialized or not. |
| 6812 INITIALIZING_STORE, | 6813 INITIALIZING_STORE, |
| 6813 // At the time of this store it is guaranteed that the entry is already | 6814 // At the time of this store it is guaranteed that the entry is already |
| 6814 // initialized. | 6815 // initialized. |
| 6815 STORE_TO_INITIALIZED_ENTRY | 6816 STORE_TO_INITIALIZED_ENTRY |
| 6816 }; | 6817 }; |
| 6817 | 6818 |
| 6818 | 6819 |
| 6819 class HStoreNamedField FINAL : public HTemplateInstruction<3> { | 6820 class HStoreNamedField FINAL : public HTemplateInstruction<3> { |
| 6820 public: | 6821 public: |
| (...skipping 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6949 DCHECK(!access.IsInobject() || access.existing_inobject_property() || | 6950 DCHECK(!access.IsInobject() || access.existing_inobject_property() || |
| 6950 obj->IsAllocate() || obj->IsInnerAllocatedObject()); | 6951 obj->IsAllocate() || obj->IsInnerAllocatedObject()); |
| 6951 SetOperandAt(0, obj); | 6952 SetOperandAt(0, obj); |
| 6952 SetOperandAt(1, val); | 6953 SetOperandAt(1, val); |
| 6953 SetOperandAt(2, obj); | 6954 SetOperandAt(2, obj); |
| 6954 access.SetGVNFlags(this, STORE); | 6955 access.SetGVNFlags(this, STORE); |
| 6955 } | 6956 } |
| 6956 | 6957 |
| 6957 HObjectAccess access_; | 6958 HObjectAccess access_; |
| 6958 HValue* dominator_; | 6959 HValue* dominator_; |
| 6959 bool has_transition_ : 1; | 6960 bool has_transition_; |
| 6960 StoreFieldOrKeyedMode store_mode_ : 1; | 6961 StoreFieldOrKeyedMode store_mode_; |
| 6961 }; | 6962 }; |
| 6962 | 6963 |
| 6963 | 6964 |
| 6964 class HStoreNamedGeneric FINAL : public HTemplateInstruction<3> { | 6965 class HStoreNamedGeneric FINAL : public HTemplateInstruction<3> { |
| 6965 public: | 6966 public: |
| 6966 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HStoreNamedGeneric, HValue*, | 6967 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HStoreNamedGeneric, HValue*, |
| 6967 Handle<String>, HValue*, | 6968 Handle<String>, HValue*, |
| 6968 StrictMode); | 6969 StrictMode); |
| 6969 HValue* object() const { return OperandAt(0); } | 6970 HValue* object() const { return OperandAt(0); } |
| 6970 HValue* value() const { return OperandAt(1); } | 6971 HValue* value() const { return OperandAt(1); } |
| (...skipping 192 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7163 if ((elements_kind >= EXTERNAL_INT8_ELEMENTS && | 7164 if ((elements_kind >= EXTERNAL_INT8_ELEMENTS && |
| 7164 elements_kind <= EXTERNAL_UINT32_ELEMENTS) || | 7165 elements_kind <= EXTERNAL_UINT32_ELEMENTS) || |
| 7165 (elements_kind >= UINT8_ELEMENTS && | 7166 (elements_kind >= UINT8_ELEMENTS && |
| 7166 elements_kind <= INT32_ELEMENTS)) { | 7167 elements_kind <= INT32_ELEMENTS)) { |
| 7167 SetFlag(kTruncatingToInt32); | 7168 SetFlag(kTruncatingToInt32); |
| 7168 } | 7169 } |
| 7169 } | 7170 } |
| 7170 | 7171 |
| 7171 ElementsKind elements_kind_; | 7172 ElementsKind elements_kind_; |
| 7172 uint32_t base_offset_; | 7173 uint32_t base_offset_; |
| 7173 bool is_dehoisted_ : 1; | 7174 bool is_dehoisted_; |
| 7174 bool is_uninitialized_ : 1; | 7175 bool is_uninitialized_; |
| 7175 StoreFieldOrKeyedMode store_mode_: 1; | 7176 StoreFieldOrKeyedMode store_mode_; |
| 7176 HValue* dominator_; | 7177 HValue* dominator_; |
| 7177 }; | 7178 }; |
| 7178 | 7179 |
| 7179 | 7180 |
| 7180 class HStoreKeyedGeneric FINAL : public HTemplateInstruction<4> { | 7181 class HStoreKeyedGeneric FINAL : public HTemplateInstruction<4> { |
| 7181 public: | 7182 public: |
| 7182 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HStoreKeyedGeneric, HValue*, | 7183 DECLARE_INSTRUCTION_WITH_CONTEXT_FACTORY_P4(HStoreKeyedGeneric, HValue*, |
| 7183 HValue*, HValue*, StrictMode); | 7184 HValue*, HValue*, StrictMode); |
| 7184 | 7185 |
| 7185 HValue* object() const { return OperandAt(0); } | 7186 HValue* object() const { return OperandAt(0); } |
| (...skipping 725 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 7911 }; | 7912 }; |
| 7912 | 7913 |
| 7913 | 7914 |
| 7914 | 7915 |
| 7915 #undef DECLARE_INSTRUCTION | 7916 #undef DECLARE_INSTRUCTION |
| 7916 #undef DECLARE_CONCRETE_INSTRUCTION | 7917 #undef DECLARE_CONCRETE_INSTRUCTION |
| 7917 | 7918 |
| 7918 } } // namespace v8::internal | 7919 } } // namespace v8::internal |
| 7919 | 7920 |
| 7920 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ | 7921 #endif // V8_HYDROGEN_INSTRUCTIONS_H_ |
| OLD | NEW |