| 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 13697 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 13708 | 13708 |
| 13709 | 13709 |
| 13710 void JSFunction::CalculateInstanceSizeForDerivedClass( | 13710 void JSFunction::CalculateInstanceSizeForDerivedClass( |
| 13711 InstanceType instance_type, int requested_internal_fields, | 13711 InstanceType instance_type, int requested_internal_fields, |
| 13712 int* instance_size, int* in_object_properties) { | 13712 int* instance_size, int* in_object_properties) { |
| 13713 Isolate* isolate = GetIsolate(); | 13713 Isolate* isolate = GetIsolate(); |
| 13714 int expected_nof_properties = 0; | 13714 int expected_nof_properties = 0; |
| 13715 for (PrototypeIterator iter(isolate, this, | 13715 for (PrototypeIterator iter(isolate, this, |
| 13716 PrototypeIterator::START_AT_RECEIVER); | 13716 PrototypeIterator::START_AT_RECEIVER); |
| 13717 !iter.IsAtEnd(); iter.Advance()) { | 13717 !iter.IsAtEnd(); iter.Advance()) { |
| 13718 JSFunction* func = iter.GetCurrent<JSFunction>(); | 13718 JSReceiver* current = iter.GetCurrent<JSReceiver>(); |
| 13719 if (!current->IsJSFunction()) break; |
| 13720 JSFunction* func = JSFunction::cast(current); |
| 13719 SharedFunctionInfo* shared = func->shared(); | 13721 SharedFunctionInfo* shared = func->shared(); |
| 13720 expected_nof_properties += shared->expected_nof_properties(); | 13722 expected_nof_properties += shared->expected_nof_properties(); |
| 13721 if (!IsSubclassConstructor(shared->kind())) { | 13723 if (!IsSubclassConstructor(shared->kind())) { |
| 13722 break; | 13724 break; |
| 13723 } | 13725 } |
| 13724 } | 13726 } |
| 13725 CalculateInstanceSizeHelper(instance_type, requested_internal_fields, | 13727 CalculateInstanceSizeHelper(instance_type, requested_internal_fields, |
| 13726 expected_nof_properties, instance_size, | 13728 expected_nof_properties, instance_size, |
| 13727 in_object_properties); | 13729 in_object_properties); |
| 13728 } | 13730 } |
| (...skipping 6133 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19862 if (cell->value() != *new_value) { | 19864 if (cell->value() != *new_value) { |
| 19863 cell->set_value(*new_value); | 19865 cell->set_value(*new_value); |
| 19864 Isolate* isolate = cell->GetIsolate(); | 19866 Isolate* isolate = cell->GetIsolate(); |
| 19865 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 19867 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
| 19866 isolate, DependentCode::kPropertyCellChangedGroup); | 19868 isolate, DependentCode::kPropertyCellChangedGroup); |
| 19867 } | 19869 } |
| 19868 } | 19870 } |
| 19869 | 19871 |
| 19870 } // namespace internal | 19872 } // namespace internal |
| 19871 } // namespace v8 | 19873 } // namespace v8 |
| OLD | NEW |