| 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 | |
| 3852 protected: | 3850 protected: |
| 3853 // Generic at put operation. | 3851 // Generic at put operation. |
| 3854 MUST_USE_RESULT static Handle<Derived> AtPut( | 3852 MUST_USE_RESULT static Handle<Derived> AtPut( |
| 3855 Handle<Derived> dictionary, | 3853 Handle<Derived> dictionary, |
| 3856 Key key, | 3854 Key key, |
| 3857 Handle<Object> value); | 3855 Handle<Object> value); |
| 3858 // Add entry to dictionary. Returns entry value. | 3856 // Add entry to dictionary. Returns entry value. |
| 3859 static int AddEntry(Handle<Derived> dictionary, Key key, Handle<Object> value, | 3857 static int AddEntry(Handle<Derived> dictionary, Key key, Handle<Object> value, |
| 3860 PropertyDetails details, uint32_t hash); | 3858 PropertyDetails details, uint32_t hash); |
| 3861 // Generate new enumeration indices to avoid enumeration index overflow. | 3859 // Generate new enumeration indices to avoid enumeration index overflow. |
| (...skipping 5719 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 9581 | 9579 |
| 9582 // Dispatched behavior. | 9580 // Dispatched behavior. |
| 9583 DECLARE_PRINTER(Symbol) | 9581 DECLARE_PRINTER(Symbol) |
| 9584 DECLARE_VERIFIER(Symbol) | 9582 DECLARE_VERIFIER(Symbol) |
| 9585 | 9583 |
| 9586 // Layout description. | 9584 // Layout description. |
| 9587 static const int kNameOffset = Name::kSize; | 9585 static const int kNameOffset = Name::kSize; |
| 9588 static const int kFlagsOffset = kNameOffset + kPointerSize; | 9586 static const int kFlagsOffset = kNameOffset + kPointerSize; |
| 9589 static const int kSize = kFlagsOffset + kPointerSize; | 9587 static const int kSize = kFlagsOffset + kPointerSize; |
| 9590 | 9588 |
| 9591 // Flags layout. | |
| 9592 static const int kPrivateBit = 0; | |
| 9593 static const int kWellKnownSymbolBit = 1; | |
| 9594 | |
| 9595 typedef FixedBodyDescriptor<kNameOffset, kFlagsOffset, kSize> BodyDescriptor; | 9589 typedef FixedBodyDescriptor<kNameOffset, kFlagsOffset, kSize> BodyDescriptor; |
| 9596 | 9590 |
| 9597 void SymbolShortPrint(std::ostream& os); | 9591 void SymbolShortPrint(std::ostream& os); |
| 9598 | 9592 |
| 9599 private: | 9593 private: |
| 9594 static const int kPrivateBit = 0; |
| 9595 static const int kWellKnownSymbolBit = 1; |
| 9596 |
| 9600 const char* PrivateSymbolToName() const; | 9597 const char* PrivateSymbolToName() const; |
| 9601 | 9598 |
| 9602 #if TRACE_MAPS | 9599 #if TRACE_MAPS |
| 9603 friend class Name; // For PrivateSymbolToName. | 9600 friend class Name; // For PrivateSymbolToName. |
| 9604 #endif | 9601 #endif |
| 9605 | 9602 |
| 9606 DISALLOW_IMPLICIT_CONSTRUCTORS(Symbol); | 9603 DISALLOW_IMPLICIT_CONSTRUCTORS(Symbol); |
| 9607 }; | 9604 }; |
| 9608 | 9605 |
| 9609 | 9606 |
| (...skipping 2262 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 11872 } | 11869 } |
| 11873 return value; | 11870 return value; |
| 11874 } | 11871 } |
| 11875 }; | 11872 }; |
| 11876 | 11873 |
| 11877 | 11874 |
| 11878 } // NOLINT, false-positive due to second-order macros. | 11875 } // NOLINT, false-positive due to second-order macros. |
| 11879 } // NOLINT, false-positive due to second-order macros. | 11876 } // NOLINT, false-positive due to second-order macros. |
| 11880 | 11877 |
| 11881 #endif // V8_OBJECTS_H_ | 11878 #endif // V8_OBJECTS_H_ |
| OLD | NEW |