OLD | NEW |
1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_LAYOUT_DESCRIPTOR_H_ | 5 #ifndef V8_LAYOUT_DESCRIPTOR_H_ |
6 #define V8_LAYOUT_DESCRIPTOR_H_ | 6 #define V8_LAYOUT_DESCRIPTOR_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 | 9 |
10 #include "src/objects.h" | 10 #include "src/objects.h" |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
62 // |map|'s layout descriptor and if it is still fast then returns it. | 62 // |map|'s layout descriptor and if it is still fast then returns it. |
63 // Otherwise the |full_layout_descriptor| is returned. | 63 // Otherwise the |full_layout_descriptor| is returned. |
64 static Handle<LayoutDescriptor> AppendIfFastOrUseFull( | 64 static Handle<LayoutDescriptor> AppendIfFastOrUseFull( |
65 Handle<Map> map, PropertyDetails details, | 65 Handle<Map> map, PropertyDetails details, |
66 Handle<LayoutDescriptor> full_layout_descriptor); | 66 Handle<LayoutDescriptor> full_layout_descriptor); |
67 | 67 |
68 // Layout descriptor that corresponds to an object all fields of which are | 68 // Layout descriptor that corresponds to an object all fields of which are |
69 // tagged (FastPointerLayout). | 69 // tagged (FastPointerLayout). |
70 V8_INLINE static LayoutDescriptor* FastPointerLayout(); | 70 V8_INLINE static LayoutDescriptor* FastPointerLayout(); |
71 | 71 |
72 #ifdef VERIFY_HEAP | |
73 // Check that this layout descriptor corresponds to given map. | 72 // Check that this layout descriptor corresponds to given map. |
74 bool IsConsistentWithMap(Map* map); | 73 bool IsConsistentWithMap(Map* map); |
75 #endif | |
76 | 74 |
77 #ifdef OBJECT_PRINT | 75 #ifdef OBJECT_PRINT |
78 // For our gdb macros, we should perhaps change these in the future. | 76 // For our gdb macros, we should perhaps change these in the future. |
79 void Print(); | 77 void Print(); |
80 | 78 |
81 void Print(std::ostream& os); // NOLINT | 79 void Print(std::ostream& os); // NOLINT |
82 #endif | 80 #endif |
83 | 81 |
84 // Capacity of layout descriptors in bits. | 82 // Capacity of layout descriptors in bits. |
85 V8_INLINE int capacity(); | 83 V8_INLINE int capacity(); |
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
132 | 130 |
133 private: | 131 private: |
134 bool all_fields_tagged_; | 132 bool all_fields_tagged_; |
135 int header_size_; | 133 int header_size_; |
136 LayoutDescriptor* layout_descriptor_; | 134 LayoutDescriptor* layout_descriptor_; |
137 }; | 135 }; |
138 } | 136 } |
139 } // namespace v8::internal | 137 } // namespace v8::internal |
140 | 138 |
141 #endif // V8_LAYOUT_DESCRIPTOR_H_ | 139 #endif // V8_LAYOUT_DESCRIPTOR_H_ |
OLD | NEW |