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 #ifndef V8_HEAP_HEAP_INL_H_ | 5 #ifndef V8_HEAP_HEAP_INL_H_ |
6 #define V8_HEAP_HEAP_INL_H_ | 6 #define V8_HEAP_HEAP_INL_H_ |
7 | 7 |
8 #include <cmath> | 8 #include <cmath> |
9 | 9 |
10 #include "src/base/platform/platform.h" | 10 #include "src/base/platform/platform.h" |
(...skipping 425 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
436 if (InNewSpace(array)) return; | 436 if (InNewSpace(array)) return; |
437 Page* page = Page::FromAddress(reinterpret_cast<Address>(array)); | 437 Page* page = Page::FromAddress(reinterpret_cast<Address>(array)); |
438 for (int i = 0; i < length; i++) { | 438 for (int i = 0; i < length; i++) { |
439 if (!InNewSpace(array->get(offset + i))) continue; | 439 if (!InNewSpace(array->get(offset + i))) continue; |
440 RememberedSet<OLD_TO_NEW>::Insert( | 440 RememberedSet<OLD_TO_NEW>::Insert( |
441 page, | 441 page, |
442 reinterpret_cast<Address>(array->RawFieldOfElementAt(offset + i))); | 442 reinterpret_cast<Address>(array->RawFieldOfElementAt(offset + i))); |
443 } | 443 } |
444 } | 444 } |
445 | 445 |
| 446 Address* Heap::store_buffer_top_address() { |
| 447 return store_buffer()->top_address(); |
| 448 } |
446 | 449 |
447 bool Heap::AllowedToBeMigrated(HeapObject* obj, AllocationSpace dst) { | 450 bool Heap::AllowedToBeMigrated(HeapObject* obj, AllocationSpace dst) { |
448 // Object migration is governed by the following rules: | 451 // Object migration is governed by the following rules: |
449 // | 452 // |
450 // 1) Objects in new-space can be migrated to the old space | 453 // 1) Objects in new-space can be migrated to the old space |
451 // that matches their target space or they stay in new-space. | 454 // that matches their target space or they stay in new-space. |
452 // 2) Objects in old-space stay in the same space when migrating. | 455 // 2) Objects in old-space stay in the same space when migrating. |
453 // 3) Fillers (two or more words) can migrate due to left-trimming of | 456 // 3) Fillers (two or more words) can migrate due to left-trimming of |
454 // fixed arrays in new-space or old space. | 457 // fixed arrays in new-space or old space. |
455 // 4) Fillers (one word) can never migrate, they are skipped by | 458 // 4) Fillers (one word) can never migrate, they are skipped by |
(...skipping 325 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
781 | 784 |
782 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { | 785 void VerifySmisVisitor::VisitPointers(Object** start, Object** end) { |
783 for (Object** current = start; current < end; current++) { | 786 for (Object** current = start; current < end; current++) { |
784 CHECK((*current)->IsSmi()); | 787 CHECK((*current)->IsSmi()); |
785 } | 788 } |
786 } | 789 } |
787 } // namespace internal | 790 } // namespace internal |
788 } // namespace v8 | 791 } // namespace v8 |
789 | 792 |
790 #endif // V8_HEAP_HEAP_INL_H_ | 793 #endif // V8_HEAP_HEAP_INL_H_ |
OLD | NEW |