| 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 15963 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 15974 ElementsKind to_kind) { | 15974 ElementsKind to_kind) { |
| 15975 if (!object->IsJSArray()) return; | 15975 if (!object->IsJSArray()) return; |
| 15976 | 15976 |
| 15977 Heap* heap = object->GetHeap(); | 15977 Heap* heap = object->GetHeap(); |
| 15978 if (!heap->InNewSpace(*object)) return; | 15978 if (!heap->InNewSpace(*object)) return; |
| 15979 | 15979 |
| 15980 Handle<AllocationSite> site; | 15980 Handle<AllocationSite> site; |
| 15981 { | 15981 { |
| 15982 DisallowHeapAllocation no_allocation; | 15982 DisallowHeapAllocation no_allocation; |
| 15983 | 15983 |
| 15984 AllocationMemento* memento = heap->FindAllocationMemento(*object); | 15984 AllocationMemento* memento = |
| 15985 heap->FindAllocationMemento<Heap::kForRuntime>(*object); |
| 15985 if (memento == NULL) return; | 15986 if (memento == NULL) return; |
| 15986 | 15987 |
| 15987 // Walk through to the Allocation Site | 15988 // Walk through to the Allocation Site |
| 15988 site = handle(memento->GetAllocationSite()); | 15989 site = handle(memento->GetAllocationSite()); |
| 15989 } | 15990 } |
| 15990 AllocationSite::DigestTransitionFeedback(site, to_kind); | 15991 AllocationSite::DigestTransitionFeedback(site, to_kind); |
| 15991 } | 15992 } |
| 15992 | 15993 |
| 15993 | 15994 |
| 15994 void JSObject::TransitionElementsKind(Handle<JSObject> object, | 15995 void JSObject::TransitionElementsKind(Handle<JSObject> object, |
| (...skipping 3747 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19742 if (cell->value() != *new_value) { | 19743 if (cell->value() != *new_value) { |
| 19743 cell->set_value(*new_value); | 19744 cell->set_value(*new_value); |
| 19744 Isolate* isolate = cell->GetIsolate(); | 19745 Isolate* isolate = cell->GetIsolate(); |
| 19745 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 19746 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
| 19746 isolate, DependentCode::kPropertyCellChangedGroup); | 19747 isolate, DependentCode::kPropertyCellChangedGroup); |
| 19747 } | 19748 } |
| 19748 } | 19749 } |
| 19749 | 19750 |
| 19750 } // namespace internal | 19751 } // namespace internal |
| 19751 } // namespace v8 | 19752 } // namespace v8 |
| OLD | NEW |