| OLD | NEW |
| 1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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 13146 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13157 | 13157 |
| 13158 | 13158 |
| 13159 void JSFunction::CalculateInstanceSizeForDerivedClass( | 13159 void JSFunction::CalculateInstanceSizeForDerivedClass( |
| 13160 InstanceType instance_type, int requested_internal_fields, | 13160 InstanceType instance_type, int requested_internal_fields, |
| 13161 int* instance_size, int* in_object_properties) { | 13161 int* instance_size, int* in_object_properties) { |
| 13162 Isolate* isolate = GetIsolate(); | 13162 Isolate* isolate = GetIsolate(); |
| 13163 int expected_nof_properties = 0; | 13163 int expected_nof_properties = 0; |
| 13164 for (PrototypeIterator iter(isolate, this, | 13164 for (PrototypeIterator iter(isolate, this, |
| 13165 PrototypeIterator::START_AT_RECEIVER); | 13165 PrototypeIterator::START_AT_RECEIVER); |
| 13166 !iter.IsAtEnd(); iter.Advance()) { | 13166 !iter.IsAtEnd(); iter.Advance()) { |
| 13167 JSFunction* func = iter.GetCurrent<JSFunction>(); | 13167 JSReceiver* current = iter.GetCurrent<JSReceiver>(); |
| 13168 if (!current->IsJSFunction()) break; |
| 13169 JSFunction* func = JSFunction::cast(current); |
| 13168 SharedFunctionInfo* shared = func->shared(); | 13170 SharedFunctionInfo* shared = func->shared(); |
| 13169 expected_nof_properties += shared->expected_nof_properties(); | 13171 expected_nof_properties += shared->expected_nof_properties(); |
| 13170 if (!IsSubclassConstructor(shared->kind())) { | 13172 if (!IsSubclassConstructor(shared->kind())) { |
| 13171 break; | 13173 break; |
| 13172 } | 13174 } |
| 13173 } | 13175 } |
| 13174 CalculateInstanceSizeHelper(instance_type, requested_internal_fields, | 13176 CalculateInstanceSizeHelper(instance_type, requested_internal_fields, |
| 13175 expected_nof_properties, instance_size, | 13177 expected_nof_properties, instance_size, |
| 13176 in_object_properties); | 13178 in_object_properties); |
| 13177 } | 13179 } |
| (...skipping 5709 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 18887 if (cell->value() != *new_value) { | 18889 if (cell->value() != *new_value) { |
| 18888 cell->set_value(*new_value); | 18890 cell->set_value(*new_value); |
| 18889 Isolate* isolate = cell->GetIsolate(); | 18891 Isolate* isolate = cell->GetIsolate(); |
| 18890 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 18892 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
| 18891 isolate, DependentCode::kPropertyCellChangedGroup); | 18893 isolate, DependentCode::kPropertyCellChangedGroup); |
| 18892 } | 18894 } |
| 18893 } | 18895 } |
| 18894 | 18896 |
| 18895 } // namespace internal | 18897 } // namespace internal |
| 18896 } // namespace v8 | 18898 } // namespace v8 |
| OLD | NEW |