OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #include <iomanip> | 5 #include <iomanip> |
6 #include <sstream> | 6 #include <sstream> |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/accessors.h" | 10 #include "src/accessors.h" |
(...skipping 6766 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
6777 | 6777 |
6778 Handle<Map> result = CopyDropDescriptors(map); | 6778 Handle<Map> result = CopyDropDescriptors(map); |
6779 Handle<Name> name = descriptor->GetKey(); | 6779 Handle<Name> name = descriptor->GetKey(); |
6780 | 6780 |
6781 // Ensure there's space for the new descriptor in the shared descriptor array. | 6781 // Ensure there's space for the new descriptor in the shared descriptor array. |
6782 if (descriptors->NumberOfSlackDescriptors() == 0) { | 6782 if (descriptors->NumberOfSlackDescriptors() == 0) { |
6783 int old_size = descriptors->number_of_descriptors(); | 6783 int old_size = descriptors->number_of_descriptors(); |
6784 if (old_size == 0) { | 6784 if (old_size == 0) { |
6785 descriptors = DescriptorArray::Allocate(map->GetIsolate(), 0, 1); | 6785 descriptors = DescriptorArray::Allocate(map->GetIsolate(), 0, 1); |
6786 } else { | 6786 } else { |
6787 EnsureDescriptorSlack( | 6787 int slack = SlackForArraySize(map->is_prototype_map(), old_size, |
6788 map, SlackForArraySize(old_size, kMaxNumberOfDescriptors)); | 6788 kMaxNumberOfDescriptors); |
| 6789 EnsureDescriptorSlack(map, slack); |
6789 descriptors = handle(map->instance_descriptors()); | 6790 descriptors = handle(map->instance_descriptors()); |
6790 } | 6791 } |
6791 } | 6792 } |
6792 | 6793 |
6793 Handle<LayoutDescriptor> layout_descriptor = | 6794 Handle<LayoutDescriptor> layout_descriptor = |
6794 FLAG_unbox_double_fields | 6795 FLAG_unbox_double_fields |
6795 ? LayoutDescriptor::ShareAppend(map, descriptor->GetDetails()) | 6796 ? LayoutDescriptor::ShareAppend(map, descriptor->GetDetails()) |
6796 : handle(LayoutDescriptor::FastPointerLayout(), map->GetIsolate()); | 6797 : handle(LayoutDescriptor::FastPointerLayout(), map->GetIsolate()); |
6797 | 6798 |
6798 { | 6799 { |
(...skipping 9349 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
16148 Handle<Object> new_value) { | 16149 Handle<Object> new_value) { |
16149 if (cell->value() != *new_value) { | 16150 if (cell->value() != *new_value) { |
16150 cell->set_value(*new_value); | 16151 cell->set_value(*new_value); |
16151 Isolate* isolate = cell->GetIsolate(); | 16152 Isolate* isolate = cell->GetIsolate(); |
16152 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 16153 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
16153 isolate, DependentCode::kPropertyCellChangedGroup); | 16154 isolate, DependentCode::kPropertyCellChangedGroup); |
16154 } | 16155 } |
16155 } | 16156 } |
16156 } // namespace internal | 16157 } // namespace internal |
16157 } // namespace v8 | 16158 } // namespace v8 |
OLD | NEW |