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 3236 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3247 inline Object** GetKeySlot(int descriptor_number); | 3247 inline Object** GetKeySlot(int descriptor_number); |
3248 inline Object* GetValue(int descriptor_number); | 3248 inline Object* GetValue(int descriptor_number); |
3249 inline void SetValue(int descriptor_number, Object* value); | 3249 inline void SetValue(int descriptor_number, Object* value); |
3250 inline Object** GetValueSlot(int descriptor_number); | 3250 inline Object** GetValueSlot(int descriptor_number); |
3251 static inline int GetValueOffset(int descriptor_number); | 3251 static inline int GetValueOffset(int descriptor_number); |
3252 inline Object** GetDescriptorStartSlot(int descriptor_number); | 3252 inline Object** GetDescriptorStartSlot(int descriptor_number); |
3253 inline Object** GetDescriptorEndSlot(int descriptor_number); | 3253 inline Object** GetDescriptorEndSlot(int descriptor_number); |
3254 inline PropertyDetails GetDetails(int descriptor_number); | 3254 inline PropertyDetails GetDetails(int descriptor_number); |
3255 inline PropertyType GetType(int descriptor_number); | 3255 inline PropertyType GetType(int descriptor_number); |
3256 inline int GetFieldIndex(int descriptor_number); | 3256 inline int GetFieldIndex(int descriptor_number); |
3257 FieldType* GetFieldType(int descriptor_number); | 3257 inline FieldType* GetFieldType(int descriptor_number); |
3258 inline Object* GetConstant(int descriptor_number); | 3258 inline Object* GetConstant(int descriptor_number); |
3259 inline Object* GetCallbacksObject(int descriptor_number); | 3259 inline Object* GetCallbacksObject(int descriptor_number); |
3260 inline AccessorDescriptor* GetCallbacks(int descriptor_number); | 3260 inline AccessorDescriptor* GetCallbacks(int descriptor_number); |
3261 | 3261 |
3262 inline Name* GetSortedKey(int descriptor_number); | 3262 inline Name* GetSortedKey(int descriptor_number); |
3263 inline int GetSortedKeyIndex(int descriptor_number); | 3263 inline int GetSortedKeyIndex(int descriptor_number); |
3264 inline void SetSortedKey(int pointer, int descriptor_number); | 3264 inline void SetSortedKey(int pointer, int descriptor_number); |
3265 inline void SetRepresentation(int descriptor_number, | 3265 inline void SetRepresentation(int descriptor_number, |
3266 Representation representation); | 3266 Representation representation); |
3267 | 3267 |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3330 static const int kDescriptorDetails = 1; | 3330 static const int kDescriptorDetails = 1; |
3331 static const int kDescriptorValue = 2; | 3331 static const int kDescriptorValue = 2; |
3332 static const int kDescriptorSize = 3; | 3332 static const int kDescriptorSize = 3; |
3333 | 3333 |
3334 #if defined(DEBUG) || defined(OBJECT_PRINT) | 3334 #if defined(DEBUG) || defined(OBJECT_PRINT) |
3335 // For our gdb macros, we should perhaps change these in the future. | 3335 // For our gdb macros, we should perhaps change these in the future. |
3336 void Print(); | 3336 void Print(); |
3337 | 3337 |
3338 // Print all the descriptors. | 3338 // Print all the descriptors. |
3339 void PrintDescriptors(std::ostream& os); // NOLINT | 3339 void PrintDescriptors(std::ostream& os); // NOLINT |
| 3340 |
| 3341 void PrintDescriptorDetails(std::ostream& os, int descriptor, |
| 3342 PropertyDetails::PrintMode mode); |
3340 #endif | 3343 #endif |
3341 | 3344 |
3342 #ifdef DEBUG | 3345 #ifdef DEBUG |
3343 // Is the descriptor array sorted and without duplicates? | 3346 // Is the descriptor array sorted and without duplicates? |
3344 bool IsSortedNoDuplicates(int valid_descriptors = -1); | 3347 bool IsSortedNoDuplicates(int valid_descriptors = -1); |
3345 | 3348 |
3346 // Is the descriptor array consistent with the back pointers in targets? | 3349 // Is the descriptor array consistent with the back pointers in targets? |
3347 bool IsConsistentWithBackPointers(Map* current_map); | 3350 bool IsConsistentWithBackPointers(Map* current_map); |
3348 | 3351 |
3349 // Are two DescriptorArrays equal? | 3352 // Are two DescriptorArrays equal? |
(...skipping 2832 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6182 | 6185 |
6183 static inline Handle<Map> CopyInitialMap(Handle<Map> map); | 6186 static inline Handle<Map> CopyInitialMap(Handle<Map> map); |
6184 static Handle<Map> CopyInitialMap(Handle<Map> map, int instance_size, | 6187 static Handle<Map> CopyInitialMap(Handle<Map> map, int instance_size, |
6185 int in_object_properties, | 6188 int in_object_properties, |
6186 int unused_property_fields); | 6189 int unused_property_fields); |
6187 static Handle<Map> CopyDropDescriptors(Handle<Map> map); | 6190 static Handle<Map> CopyDropDescriptors(Handle<Map> map); |
6188 static Handle<Map> CopyInsertDescriptor(Handle<Map> map, | 6191 static Handle<Map> CopyInsertDescriptor(Handle<Map> map, |
6189 Descriptor* descriptor, | 6192 Descriptor* descriptor, |
6190 TransitionFlag flag); | 6193 TransitionFlag flag); |
6191 | 6194 |
6192 static Handle<Object> WrapType(Handle<FieldType> type); | 6195 static Handle<Object> WrapFieldType(Handle<FieldType> type); |
| 6196 static FieldType* UnwrapFieldType(Object* wrapped_type); |
6193 | 6197 |
6194 MUST_USE_RESULT static MaybeHandle<Map> CopyWithField( | 6198 MUST_USE_RESULT static MaybeHandle<Map> CopyWithField( |
6195 Handle<Map> map, Handle<Name> name, Handle<FieldType> type, | 6199 Handle<Map> map, Handle<Name> name, Handle<FieldType> type, |
6196 PropertyAttributes attributes, Representation representation, | 6200 PropertyAttributes attributes, Representation representation, |
6197 TransitionFlag flag); | 6201 TransitionFlag flag); |
6198 | 6202 |
6199 MUST_USE_RESULT static MaybeHandle<Map> CopyWithConstant( | 6203 MUST_USE_RESULT static MaybeHandle<Map> CopyWithConstant( |
6200 Handle<Map> map, | 6204 Handle<Map> map, |
6201 Handle<Name> name, | 6205 Handle<Name> name, |
6202 Handle<Object> constant, | 6206 Handle<Object> constant, |
(...skipping 5531 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
11734 } | 11738 } |
11735 }; | 11739 }; |
11736 | 11740 |
11737 | 11741 |
11738 } // NOLINT, false-positive due to second-order macros. | 11742 } // NOLINT, false-positive due to second-order macros. |
11739 } // NOLINT, false-positive due to second-order macros. | 11743 } // NOLINT, false-positive due to second-order macros. |
11740 | 11744 |
11741 #include "src/objects/object-macros-undef.h" | 11745 #include "src/objects/object-macros-undef.h" |
11742 | 11746 |
11743 #endif // V8_OBJECTS_H_ | 11747 #endif // V8_OBJECTS_H_ |
OLD | NEW |