| 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 15995 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 16006 ElementsKind to_kind) { | 16006 ElementsKind to_kind) { |
| 16007 if (!object->IsJSArray()) return; | 16007 if (!object->IsJSArray()) return; |
| 16008 | 16008 |
| 16009 Heap* heap = object->GetHeap(); | 16009 Heap* heap = object->GetHeap(); |
| 16010 if (!heap->InNewSpace(*object)) return; | 16010 if (!heap->InNewSpace(*object)) return; |
| 16011 | 16011 |
| 16012 Handle<AllocationSite> site; | 16012 Handle<AllocationSite> site; |
| 16013 { | 16013 { |
| 16014 DisallowHeapAllocation no_allocation; | 16014 DisallowHeapAllocation no_allocation; |
| 16015 | 16015 |
| 16016 AllocationMemento* memento = heap->FindAllocationMemento(*object); | 16016 AllocationMemento* memento = |
| 16017 heap->FindAllocationMemento<Heap::kForRuntime>(*object); |
| 16017 if (memento == NULL) return; | 16018 if (memento == NULL) return; |
| 16018 | 16019 |
| 16019 // Walk through to the Allocation Site | 16020 // Walk through to the Allocation Site |
| 16020 site = handle(memento->GetAllocationSite()); | 16021 site = handle(memento->GetAllocationSite()); |
| 16021 } | 16022 } |
| 16022 AllocationSite::DigestTransitionFeedback(site, to_kind); | 16023 AllocationSite::DigestTransitionFeedback(site, to_kind); |
| 16023 } | 16024 } |
| 16024 | 16025 |
| 16025 | 16026 |
| 16026 void JSObject::TransitionElementsKind(Handle<JSObject> object, | 16027 void JSObject::TransitionElementsKind(Handle<JSObject> object, |
| (...skipping 3688 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 19715 if (cell->value() != *new_value) { | 19716 if (cell->value() != *new_value) { |
| 19716 cell->set_value(*new_value); | 19717 cell->set_value(*new_value); |
| 19717 Isolate* isolate = cell->GetIsolate(); | 19718 Isolate* isolate = cell->GetIsolate(); |
| 19718 cell->dependent_code()->DeoptimizeDependentCodeGroup( | 19719 cell->dependent_code()->DeoptimizeDependentCodeGroup( |
| 19719 isolate, DependentCode::kPropertyCellChangedGroup); | 19720 isolate, DependentCode::kPropertyCellChangedGroup); |
| 19720 } | 19721 } |
| 19721 } | 19722 } |
| 19722 | 19723 |
| 19723 } // namespace internal | 19724 } // namespace internal |
| 19724 } // namespace v8 | 19725 } // namespace v8 |
| OLD | NEW |