| 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 6744 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6755 | 6755 |
| 6756 Handle<Map> result = CopyDropDescriptors(map); | 6756 Handle<Map> result = CopyDropDescriptors(map); |
| 6757 Handle<Name> name = descriptor->GetKey(); | 6757 Handle<Name> name = descriptor->GetKey(); |
| 6758 | 6758 |
| 6759 // Ensure there's space for the new descriptor in the shared descriptor array. | 6759 // Ensure there's space for the new descriptor in the shared descriptor array. |
| 6760 if (descriptors->NumberOfSlackDescriptors() == 0) { | 6760 if (descriptors->NumberOfSlackDescriptors() == 0) { |
| 6761 int old_size = descriptors->number_of_descriptors(); | 6761 int old_size = descriptors->number_of_descriptors(); |
| 6762 if (old_size == 0) { | 6762 if (old_size == 0) { |
| 6763 descriptors = DescriptorArray::Allocate(map->GetIsolate(), 0, 1); | 6763 descriptors = DescriptorArray::Allocate(map->GetIsolate(), 0, 1); |
| 6764 } else { | 6764 } else { |
| 6765 int slack = SlackForArraySize(map->is_prototype_map(), old_size, | 6765 int slack = SlackForArraySize(old_size, kMaxNumberOfDescriptors); |
| 6766 kMaxNumberOfDescriptors); | |
| 6767 EnsureDescriptorSlack(map, slack); | 6766 EnsureDescriptorSlack(map, slack); |
| 6768 descriptors = handle(map->instance_descriptors()); | 6767 descriptors = handle(map->instance_descriptors()); |
| 6769 } | 6768 } |
| 6770 } | 6769 } |
| 6771 | 6770 |
| 6772 Handle<LayoutDescriptor> layout_descriptor = | 6771 Handle<LayoutDescriptor> layout_descriptor = |
| 6773 FLAG_unbox_double_fields | 6772 FLAG_unbox_double_fields |
| 6774 ? LayoutDescriptor::ShareAppend(map, descriptor->GetDetails()) | 6773 ? LayoutDescriptor::ShareAppend(map, descriptor->GetDetails()) |
| 6775 : handle(LayoutDescriptor::FastPointerLayout(), map->GetIsolate()); | 6774 : handle(LayoutDescriptor::FastPointerLayout(), map->GetIsolate()); |
| 6776 | 6775 |
| (...skipping 9350 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16127 Handle<Object> new_value) { | 16126 Handle<Object> new_value) { |
| 16128 if (cell->value() != *new_value) { | 16127 if (cell->value() != *new_value) { |
| 16129 cell->set_value(*new_value); | 16128 cell->set_value(*new_value); |
| 16130 Isolate* isolate = cell->GetIsolate(); | 16129 Isolate* isolate = cell->GetIsolate(); |
| 16131 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 16130 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
| 16132 isolate, DependentCode::kPropertyCellChangedGroup); | 16131 isolate, DependentCode::kPropertyCellChangedGroup); |
| 16133 } | 16132 } |
| 16134 } | 16133 } |
| 16135 } // namespace internal | 16134 } // namespace internal |
| 16136 } // namespace v8 | 16135 } // namespace v8 |
| OLD | NEW |