| 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 <iomanip> | 7 #include <iomanip> |
| 8 #include <sstream> | 8 #include <sstream> |
| 9 | 9 |
| 10 #include "src/accessors.h" | 10 #include "src/accessors.h" |
| (...skipping 1758 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1769 // registers with its new prototype now. This preserves the invariant that | 1769 // registers with its new prototype now. This preserves the invariant that |
| 1770 // when a map on a prototype chain is registered with its prototype, then | 1770 // when a map on a prototype chain is registered with its prototype, then |
| 1771 // all prototypes further up the chain are also registered with their | 1771 // all prototypes further up the chain are also registered with their |
| 1772 // respective prototypes. | 1772 // respective prototypes. |
| 1773 UpdatePrototypeUserRegistration(old_map, new_map, new_map->GetIsolate()); | 1773 UpdatePrototypeUserRegistration(old_map, new_map, new_map->GetIsolate()); |
| 1774 | 1774 |
| 1775 if (object->HasFastProperties()) { | 1775 if (object->HasFastProperties()) { |
| 1776 if (!new_map->is_dictionary_map()) { | 1776 if (!new_map->is_dictionary_map()) { |
| 1777 MigrateFastToFast(object, new_map); | 1777 MigrateFastToFast(object, new_map); |
| 1778 if (old_map->is_prototype_map()) { | 1778 if (old_map->is_prototype_map()) { |
| 1779 DCHECK(!old_map->is_stable()); |
| 1780 DCHECK(new_map->is_stable()); |
| 1779 // Clear out the old descriptor array to avoid problems to sharing | 1781 // Clear out the old descriptor array to avoid problems to sharing |
| 1780 // the descriptor array without using an explicit. | 1782 // the descriptor array without using an explicit. |
| 1781 old_map->InitializeDescriptors( | 1783 old_map->InitializeDescriptors( |
| 1782 old_map->GetHeap()->empty_descriptor_array(), | 1784 old_map->GetHeap()->empty_descriptor_array(), |
| 1783 LayoutDescriptor::FastPointerLayout()); | 1785 LayoutDescriptor::FastPointerLayout()); |
| 1784 // Ensure that no transition was inserted for prototype migrations. | 1786 // Ensure that no transition was inserted for prototype migrations. |
| 1785 DCHECK_EQ(0, TransitionArray::NumberOfTransitions( | 1787 DCHECK_EQ(0, TransitionArray::NumberOfTransitions( |
| 1786 old_map->raw_transitions())); | 1788 old_map->raw_transitions())); |
| 1787 DCHECK(new_map->GetBackPointer()->IsUndefined()); | 1789 DCHECK(new_map->GetBackPointer()->IsUndefined()); |
| 1788 } | 1790 } |
| (...skipping 13879 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15668 if (cell->value() != *new_value) { | 15670 if (cell->value() != *new_value) { |
| 15669 cell->set_value(*new_value); | 15671 cell->set_value(*new_value); |
| 15670 Isolate* isolate = cell->GetIsolate(); | 15672 Isolate* isolate = cell->GetIsolate(); |
| 15671 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 15673 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
| 15672 isolate, DependentCode::kPropertyCellChangedGroup); | 15674 isolate, DependentCode::kPropertyCellChangedGroup); |
| 15673 } | 15675 } |
| 15674 } | 15676 } |
| 15675 | 15677 |
| 15676 } // namespace internal | 15678 } // namespace internal |
| 15677 } // namespace v8 | 15679 } // namespace v8 |
| OLD | NEW |