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