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 "src/objects.h" | 5 #include "src/objects.h" |
6 | 6 |
7 #include <cmath> | 7 #include <cmath> |
8 #include <iomanip> | 8 #include <iomanip> |
9 #include <sstream> | 9 #include <sstream> |
10 | 10 |
(...skipping 9805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9816 | 9816 |
9817 Handle<DescriptorArray> DescriptorArray::Allocate(Isolate* isolate, | 9817 Handle<DescriptorArray> DescriptorArray::Allocate(Isolate* isolate, |
9818 int number_of_descriptors, | 9818 int number_of_descriptors, |
9819 int slack) { | 9819 int slack) { |
9820 DCHECK(0 <= number_of_descriptors); | 9820 DCHECK(0 <= number_of_descriptors); |
9821 Factory* factory = isolate->factory(); | 9821 Factory* factory = isolate->factory(); |
9822 // Do not use DescriptorArray::cast on incomplete object. | 9822 // Do not use DescriptorArray::cast on incomplete object. |
9823 int size = number_of_descriptors + slack; | 9823 int size = number_of_descriptors + slack; |
9824 if (size == 0) return factory->empty_descriptor_array(); | 9824 if (size == 0) return factory->empty_descriptor_array(); |
9825 // Allocate the array of keys. | 9825 // Allocate the array of keys. |
9826 Handle<FixedArray> result = factory->NewFixedArray(LengthFor(size), TENURED); | 9826 Handle<FixedArray> result = factory->NewFixedArray(LengthFor(size)); |
9827 | 9827 |
9828 result->set(kDescriptorLengthIndex, Smi::FromInt(number_of_descriptors)); | 9828 result->set(kDescriptorLengthIndex, Smi::FromInt(number_of_descriptors)); |
9829 result->set(kEnumCacheIndex, Smi::FromInt(0)); | 9829 result->set(kEnumCacheIndex, Smi::FromInt(0)); |
9830 return Handle<DescriptorArray>::cast(result); | 9830 return Handle<DescriptorArray>::cast(result); |
9831 } | 9831 } |
9832 | 9832 |
9833 | 9833 |
9834 void DescriptorArray::ClearEnumCache() { | 9834 void DescriptorArray::ClearEnumCache() { |
9835 set(kEnumCacheIndex, Smi::FromInt(0)); | 9835 set(kEnumCacheIndex, Smi::FromInt(0)); |
9836 } | 9836 } |
(...skipping 8731 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
18568 if (cell->value() != *new_value) { | 18568 if (cell->value() != *new_value) { |
18569 cell->set_value(*new_value); | 18569 cell->set_value(*new_value); |
18570 Isolate* isolate = cell->GetIsolate(); | 18570 Isolate* isolate = cell->GetIsolate(); |
18571 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 18571 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
18572 isolate, DependentCode::kPropertyCellChangedGroup); | 18572 isolate, DependentCode::kPropertyCellChangedGroup); |
18573 } | 18573 } |
18574 } | 18574 } |
18575 | 18575 |
18576 } // namespace internal | 18576 } // namespace internal |
18577 } // namespace v8 | 18577 } // namespace v8 |
OLD | NEW |