| Index: src/layout-descriptor.h
|
| diff --git a/src/layout-descriptor.h b/src/layout-descriptor.h
|
| index 8f2942c0eb52319b2ca1b61fe1f6fad86a840912..a66a5ee0be8f1af4115554d87f97b7c3db333580 100644
|
| --- a/src/layout-descriptor.h
|
| +++ b/src/layout-descriptor.h
|
| @@ -70,7 +70,14 @@ class LayoutDescriptor : public FixedTypedArray<Uint32ArrayTraits> {
|
| V8_INLINE static LayoutDescriptor* FastPointerLayout();
|
|
|
| // Check that this layout descriptor corresponds to given map.
|
| - bool IsConsistentWithMap(Map* map);
|
| + bool IsConsistentWithMap(Map* map, bool check_tail = false);
|
| +
|
| + // Trims this layout descriptor to given number of descriptors. This happens
|
| + // only when corresponding descriptors array is trimmed.
|
| + // The layout descriptor could be trimmed if it was slow or it could
|
| + // become fast.
|
| + LayoutDescriptor* Trim(Heap* heap, Map* map, DescriptorArray* descriptors,
|
| + int num_descriptors);
|
|
|
| #ifdef OBJECT_PRINT
|
| // For our gdb macros, we should perhaps change these in the future.
|
| @@ -94,6 +101,17 @@ class LayoutDescriptor : public FixedTypedArray<Uint32ArrayTraits> {
|
| V8_INLINE static bool InobjectUnboxedField(int inobject_properties,
|
| PropertyDetails details);
|
|
|
| + // Calculates minimal layout descriptor capacity required for given
|
| + // |map|, |descriptors| and |num_descriptors|.
|
| + V8_INLINE static int CalculateCapacity(Map* map, DescriptorArray* descriptors,
|
| + int num_descriptors);
|
| +
|
| + // Fills in clean |layout_descriptor| according to given |map|, |descriptors|
|
| + // and |num_descriptors|.
|
| + V8_INLINE static LayoutDescriptor* Initialize(
|
| + LayoutDescriptor* layout_descriptor, Map* map,
|
| + DescriptorArray* descriptors, int num_descriptors);
|
| +
|
| static Handle<LayoutDescriptor> EnsureCapacity(
|
| Isolate* isolate, Handle<LayoutDescriptor> layout_descriptor,
|
| int new_capacity);
|
|
|