| OLD | NEW |
| 1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 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/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #include "src/accessors.h" | 7 #include "src/accessors.h" |
| 8 #include "src/api.h" | 8 #include "src/api.h" |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/base/once.h" | 10 #include "src/base/once.h" |
| (...skipping 5595 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5606 if (dep->IsDependentCode()) return DependentCode::cast(dep); | 5606 if (dep->IsDependentCode()) return DependentCode::cast(dep); |
| 5607 return DependentCode::cast(empty_fixed_array()); | 5607 return DependentCode::cast(empty_fixed_array()); |
| 5608 } | 5608 } |
| 5609 | 5609 |
| 5610 | 5610 |
| 5611 void Heap::AddRetainedMap(Handle<Map> map) { | 5611 void Heap::AddRetainedMap(Handle<Map> map) { |
| 5612 if (FLAG_retain_maps_for_n_gc == 0) return; | 5612 if (FLAG_retain_maps_for_n_gc == 0) return; |
| 5613 Handle<WeakCell> cell = Map::WeakCellForMap(map); | 5613 Handle<WeakCell> cell = Map::WeakCellForMap(map); |
| 5614 Handle<ArrayList> array(retained_maps(), isolate()); | 5614 Handle<ArrayList> array(retained_maps(), isolate()); |
| 5615 array = ArrayList::Add( | 5615 array = ArrayList::Add( |
| 5616 array, cell, handle(Smi::FromInt(FLAG_retain_maps_for_n_gc), isolate())); | 5616 array, cell, handle(Smi::FromInt(FLAG_retain_maps_for_n_gc), isolate()), |
| 5617 ArrayList::kReloadLengthAfterAllocation); |
| 5617 if (*array != retained_maps()) { | 5618 if (*array != retained_maps()) { |
| 5618 set_retained_maps(*array); | 5619 set_retained_maps(*array); |
| 5619 } | 5620 } |
| 5620 } | 5621 } |
| 5621 | 5622 |
| 5622 | 5623 |
| 5623 void Heap::FatalProcessOutOfMemory(const char* location, bool take_snapshot) { | 5624 void Heap::FatalProcessOutOfMemory(const char* location, bool take_snapshot) { |
| 5624 v8::internal::V8::FatalProcessOutOfMemory(location, take_snapshot); | 5625 v8::internal::V8::FatalProcessOutOfMemory(location, take_snapshot); |
| 5625 } | 5626 } |
| 5626 | 5627 |
| (...skipping 762 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 6389 static_cast<int>(object_sizes_last_time_[index])); | 6390 static_cast<int>(object_sizes_last_time_[index])); |
| 6390 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) | 6391 CODE_AGE_LIST_COMPLETE(ADJUST_LAST_TIME_OBJECT_COUNT) |
| 6391 #undef ADJUST_LAST_TIME_OBJECT_COUNT | 6392 #undef ADJUST_LAST_TIME_OBJECT_COUNT |
| 6392 | 6393 |
| 6393 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); | 6394 MemCopy(object_counts_last_time_, object_counts_, sizeof(object_counts_)); |
| 6394 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); | 6395 MemCopy(object_sizes_last_time_, object_sizes_, sizeof(object_sizes_)); |
| 6395 ClearObjectStats(); | 6396 ClearObjectStats(); |
| 6396 } | 6397 } |
| 6397 } | 6398 } |
| 6398 } // namespace v8::internal | 6399 } // namespace v8::internal |
| OLD | NEW |