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 9018 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
9029 Handle<Map> result = RawCopy(map, instance_size); | 9029 Handle<Map> result = RawCopy(map, instance_size); |
9030 | 9030 |
9031 // Please note instance_type and instance_size are set when allocated. | 9031 // Please note instance_type and instance_size are set when allocated. |
9032 result->SetInObjectProperties(in_object_properties); | 9032 result->SetInObjectProperties(in_object_properties); |
9033 result->set_unused_property_fields(unused_property_fields); | 9033 result->set_unused_property_fields(unused_property_fields); |
9034 | 9034 |
9035 int number_of_own_descriptors = map->NumberOfOwnDescriptors(); | 9035 int number_of_own_descriptors = map->NumberOfOwnDescriptors(); |
9036 if (number_of_own_descriptors > 0) { | 9036 if (number_of_own_descriptors > 0) { |
9037 // The copy will use the same descriptors array. | 9037 // The copy will use the same descriptors array. |
9038 result->UpdateDescriptors(map->instance_descriptors(), | 9038 result->UpdateDescriptors(map->instance_descriptors(), |
9039 map->layout_descriptor()); | 9039 map->GetLayoutDescriptor()); |
9040 result->SetNumberOfOwnDescriptors(number_of_own_descriptors); | 9040 result->SetNumberOfOwnDescriptors(number_of_own_descriptors); |
9041 | 9041 |
9042 DCHECK_EQ(result->NumberOfFields(), | 9042 DCHECK_EQ(result->NumberOfFields(), |
9043 in_object_properties - unused_property_fields); | 9043 in_object_properties - unused_property_fields); |
9044 } | 9044 } |
9045 | 9045 |
9046 return result; | 9046 return result; |
9047 } | 9047 } |
9048 | 9048 |
9049 | 9049 |
(...skipping 10268 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
19318 if (cell->value() != *new_value) { | 19318 if (cell->value() != *new_value) { |
19319 cell->set_value(*new_value); | 19319 cell->set_value(*new_value); |
19320 Isolate* isolate = cell->GetIsolate(); | 19320 Isolate* isolate = cell->GetIsolate(); |
19321 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 19321 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
19322 isolate, DependentCode::kPropertyCellChangedGroup); | 19322 isolate, DependentCode::kPropertyCellChangedGroup); |
19323 } | 19323 } |
19324 } | 19324 } |
19325 | 19325 |
19326 } // namespace internal | 19326 } // namespace internal |
19327 } // namespace v8 | 19327 } // namespace v8 |
OLD | NEW |