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 10489 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
10500 | 10500 |
10501 Handle<DescriptorArray> DescriptorArray::Allocate(Isolate* isolate, | 10501 Handle<DescriptorArray> DescriptorArray::Allocate(Isolate* isolate, |
10502 int number_of_descriptors, | 10502 int number_of_descriptors, |
10503 int slack) { | 10503 int slack) { |
10504 DCHECK(0 <= number_of_descriptors); | 10504 DCHECK(0 <= number_of_descriptors); |
10505 Factory* factory = isolate->factory(); | 10505 Factory* factory = isolate->factory(); |
10506 // Do not use DescriptorArray::cast on incomplete object. | 10506 // Do not use DescriptorArray::cast on incomplete object. |
10507 int size = number_of_descriptors + slack; | 10507 int size = number_of_descriptors + slack; |
10508 if (size == 0) return factory->empty_descriptor_array(); | 10508 if (size == 0) return factory->empty_descriptor_array(); |
10509 // Allocate the array of keys. | 10509 // Allocate the array of keys. |
10510 Handle<FixedArray> result = factory->NewFixedArray(LengthFor(size), TENURED); | 10510 Handle<FixedArray> result = factory->NewFixedArray(LengthFor(size)); |
10511 | 10511 |
10512 result->set(kDescriptorLengthIndex, Smi::FromInt(number_of_descriptors)); | 10512 result->set(kDescriptorLengthIndex, Smi::FromInt(number_of_descriptors)); |
10513 result->set(kEnumCacheIndex, Smi::FromInt(0)); | 10513 result->set(kEnumCacheIndex, Smi::FromInt(0)); |
10514 return Handle<DescriptorArray>::cast(result); | 10514 return Handle<DescriptorArray>::cast(result); |
10515 } | 10515 } |
10516 | 10516 |
10517 | 10517 |
10518 void DescriptorArray::ClearEnumCache() { | 10518 void DescriptorArray::ClearEnumCache() { |
10519 set(kEnumCacheIndex, Smi::FromInt(0)); | 10519 set(kEnumCacheIndex, Smi::FromInt(0)); |
10520 } | 10520 } |
(...skipping 8791 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19312 if (cell->value() != *new_value) { | 19312 if (cell->value() != *new_value) { |
19313 cell->set_value(*new_value); | 19313 cell->set_value(*new_value); |
19314 Isolate* isolate = cell->GetIsolate(); | 19314 Isolate* isolate = cell->GetIsolate(); |
19315 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 19315 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
19316 isolate, DependentCode::kPropertyCellChangedGroup); | 19316 isolate, DependentCode::kPropertyCellChangedGroup); |
19317 } | 19317 } |
19318 } | 19318 } |
19319 | 19319 |
19320 } // namespace internal | 19320 } // namespace internal |
19321 } // namespace v8 | 19321 } // namespace v8 |
OLD | NEW |