OLD | NEW |
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 3829 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3840 int* entry_out = nullptr); | 3840 int* entry_out = nullptr); |
3841 | 3841 |
3842 // Returns iteration indices array for the |dictionary|. | 3842 // Returns iteration indices array for the |dictionary|. |
3843 // Values are direct indices in the |HashTable| array. | 3843 // Values are direct indices in the |HashTable| array. |
3844 static Handle<FixedArray> BuildIterationIndicesArray( | 3844 static Handle<FixedArray> BuildIterationIndicesArray( |
3845 Handle<Derived> dictionary); | 3845 Handle<Derived> dictionary); |
3846 | 3846 |
3847 static const int kMaxNumberKeyIndex = DerivedHashTable::kPrefixStartIndex; | 3847 static const int kMaxNumberKeyIndex = DerivedHashTable::kPrefixStartIndex; |
3848 static const int kNextEnumerationIndexIndex = kMaxNumberKeyIndex + 1; | 3848 static const int kNextEnumerationIndexIndex = kMaxNumberKeyIndex + 1; |
3849 | 3849 |
| 3850 static const bool kIsEnumerable = Shape::kIsEnumerable; |
| 3851 |
3850 protected: | 3852 protected: |
3851 // Generic at put operation. | 3853 // Generic at put operation. |
3852 MUST_USE_RESULT static Handle<Derived> AtPut( | 3854 MUST_USE_RESULT static Handle<Derived> AtPut( |
3853 Handle<Derived> dictionary, | 3855 Handle<Derived> dictionary, |
3854 Key key, | 3856 Key key, |
3855 Handle<Object> value); | 3857 Handle<Object> value); |
3856 // Add entry to dictionary. Returns entry value. | 3858 // Add entry to dictionary. Returns entry value. |
3857 static int AddEntry(Handle<Derived> dictionary, Key key, Handle<Object> value, | 3859 static int AddEntry(Handle<Derived> dictionary, Key key, Handle<Object> value, |
3858 PropertyDetails details, uint32_t hash); | 3860 PropertyDetails details, uint32_t hash); |
3859 // Generate new enumeration indices to avoid enumeration index overflow. | 3861 // Generate new enumeration indices to avoid enumeration index overflow. |
(...skipping 5719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9579 | 9581 |
9580 // Dispatched behavior. | 9582 // Dispatched behavior. |
9581 DECLARE_PRINTER(Symbol) | 9583 DECLARE_PRINTER(Symbol) |
9582 DECLARE_VERIFIER(Symbol) | 9584 DECLARE_VERIFIER(Symbol) |
9583 | 9585 |
9584 // Layout description. | 9586 // Layout description. |
9585 static const int kNameOffset = Name::kSize; | 9587 static const int kNameOffset = Name::kSize; |
9586 static const int kFlagsOffset = kNameOffset + kPointerSize; | 9588 static const int kFlagsOffset = kNameOffset + kPointerSize; |
9587 static const int kSize = kFlagsOffset + kPointerSize; | 9589 static const int kSize = kFlagsOffset + kPointerSize; |
9588 | 9590 |
| 9591 // Flags layout. |
| 9592 static const int kPrivateBit = 0; |
| 9593 static const int kWellKnownSymbolBit = 1; |
| 9594 |
9589 typedef FixedBodyDescriptor<kNameOffset, kFlagsOffset, kSize> BodyDescriptor; | 9595 typedef FixedBodyDescriptor<kNameOffset, kFlagsOffset, kSize> BodyDescriptor; |
9590 | 9596 |
9591 void SymbolShortPrint(std::ostream& os); | 9597 void SymbolShortPrint(std::ostream& os); |
9592 | 9598 |
9593 private: | 9599 private: |
9594 static const int kPrivateBit = 0; | |
9595 static const int kWellKnownSymbolBit = 1; | |
9596 | |
9597 const char* PrivateSymbolToName() const; | 9600 const char* PrivateSymbolToName() const; |
9598 | 9601 |
9599 #if TRACE_MAPS | 9602 #if TRACE_MAPS |
9600 friend class Name; // For PrivateSymbolToName. | 9603 friend class Name; // For PrivateSymbolToName. |
9601 #endif | 9604 #endif |
9602 | 9605 |
9603 DISALLOW_IMPLICIT_CONSTRUCTORS(Symbol); | 9606 DISALLOW_IMPLICIT_CONSTRUCTORS(Symbol); |
9604 }; | 9607 }; |
9605 | 9608 |
9606 | 9609 |
(...skipping 2262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11869 } | 11872 } |
11870 return value; | 11873 return value; |
11871 } | 11874 } |
11872 }; | 11875 }; |
11873 | 11876 |
11874 | 11877 |
11875 } // NOLINT, false-positive due to second-order macros. | 11878 } // NOLINT, false-positive due to second-order macros. |
11876 } // NOLINT, false-positive due to second-order macros. | 11879 } // NOLINT, false-positive due to second-order macros. |
11877 | 11880 |
11878 #endif // V8_OBJECTS_H_ | 11881 #endif // V8_OBJECTS_H_ |
OLD | NEW |