| 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 16026 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16037 ElementsKind to_kind) { | 16037 ElementsKind to_kind) { |
| 16038 if (!object->IsJSArray()) return; | 16038 if (!object->IsJSArray()) return; |
| 16039 | 16039 |
| 16040 Heap* heap = object->GetHeap(); | 16040 Heap* heap = object->GetHeap(); |
| 16041 if (!heap->InNewSpace(*object)) return; | 16041 if (!heap->InNewSpace(*object)) return; |
| 16042 | 16042 |
| 16043 Handle<AllocationSite> site; | 16043 Handle<AllocationSite> site; |
| 16044 { | 16044 { |
| 16045 DisallowHeapAllocation no_allocation; | 16045 DisallowHeapAllocation no_allocation; |
| 16046 | 16046 |
| 16047 AllocationMemento* memento = heap->FindAllocationMemento(*object); | 16047 AllocationMemento* memento = |
| 16048 heap->FindAllocationMemento<Heap::kForRuntime>(*object); |
| 16048 if (memento == NULL) return; | 16049 if (memento == NULL) return; |
| 16049 | 16050 |
| 16050 // Walk through to the Allocation Site | 16051 // Walk through to the Allocation Site |
| 16051 site = handle(memento->GetAllocationSite()); | 16052 site = handle(memento->GetAllocationSite()); |
| 16052 } | 16053 } |
| 16053 AllocationSite::DigestTransitionFeedback(site, to_kind); | 16054 AllocationSite::DigestTransitionFeedback(site, to_kind); |
| 16054 } | 16055 } |
| 16055 | 16056 |
| 16056 | 16057 |
| 16057 void JSObject::TransitionElementsKind(Handle<JSObject> object, | 16058 void JSObject::TransitionElementsKind(Handle<JSObject> object, |
| (...skipping 3689 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19747 if (cell->value() != *new_value) { | 19748 if (cell->value() != *new_value) { |
| 19748 cell->set_value(*new_value); | 19749 cell->set_value(*new_value); |
| 19749 Isolate* isolate = cell->GetIsolate(); | 19750 Isolate* isolate = cell->GetIsolate(); |
| 19750 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 19751 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
| 19751 isolate, DependentCode::kPropertyCellChangedGroup); | 19752 isolate, DependentCode::kPropertyCellChangedGroup); |
| 19752 } | 19753 } |
| 19753 } | 19754 } |
| 19754 | 19755 |
| 19755 } // namespace internal | 19756 } // namespace internal |
| 19756 } // namespace v8 | 19757 } // namespace v8 |
| OLD | NEW |