| OLD | NEW |
| 1 // Copyright 2011 the V8 project authors. All rights reserved. | 1 // Copyright 2011 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_SPACES_H_ | 5 #ifndef V8_HEAP_SPACES_H_ |
| 6 #define V8_HEAP_SPACES_H_ | 6 #define V8_HEAP_SPACES_H_ |
| 7 | 7 |
| 8 #include <list> | 8 #include <list> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <unordered_set> | 10 #include <unordered_set> |
| (...skipping 649 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 660 // Page* p = Page::FromTopOrLimit(top); | 660 // Page* p = Page::FromTopOrLimit(top); |
| 661 class Page : public MemoryChunk { | 661 class Page : public MemoryChunk { |
| 662 public: | 662 public: |
| 663 static const intptr_t kCopyAllFlags = ~0; | 663 static const intptr_t kCopyAllFlags = ~0; |
| 664 | 664 |
| 665 // Page flags copied from from-space to to-space when flipping semispaces. | 665 // Page flags copied from from-space to to-space when flipping semispaces. |
| 666 static const intptr_t kCopyOnFlipFlagsMask = | 666 static const intptr_t kCopyOnFlipFlagsMask = |
| 667 static_cast<intptr_t>(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING) | | 667 static_cast<intptr_t>(MemoryChunk::POINTERS_TO_HERE_ARE_INTERESTING) | |
| 668 static_cast<intptr_t>(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING); | 668 static_cast<intptr_t>(MemoryChunk::POINTERS_FROM_HERE_ARE_INTERESTING); |
| 669 | 669 |
| 670 static inline Page* ConvertNewToOld(Page* old_page, PagedSpace* new_owner); | 670 static inline Page* ConvertNewToOld(Page* old_page); |
| 671 | 671 |
| 672 // Returns the page containing a given address. The address ranges | 672 // Returns the page containing a given address. The address ranges |
| 673 // from [page_addr .. page_addr + kPageSize[. This only works if the object | 673 // from [page_addr .. page_addr + kPageSize[. This only works if the object |
| 674 // is in fact in a page. | 674 // is in fact in a page. |
| 675 static Page* FromAddress(Address addr) { | 675 static Page* FromAddress(Address addr) { |
| 676 return reinterpret_cast<Page*>(OffsetFrom(addr) & ~kPageAlignmentMask); | 676 return reinterpret_cast<Page*>(OffsetFrom(addr) & ~kPageAlignmentMask); |
| 677 } | 677 } |
| 678 | 678 |
| 679 // Returns the page containing the address provided. The address can | 679 // Returns the page containing the address provided. The address can |
| 680 // potentially point righter after the page. To be also safe for tagged values | 680 // potentially point righter after the page. To be also safe for tagged values |
| (...skipping 2219 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2900 PageIterator old_iterator_; | 2900 PageIterator old_iterator_; |
| 2901 PageIterator code_iterator_; | 2901 PageIterator code_iterator_; |
| 2902 PageIterator map_iterator_; | 2902 PageIterator map_iterator_; |
| 2903 LargePageIterator lo_iterator_; | 2903 LargePageIterator lo_iterator_; |
| 2904 }; | 2904 }; |
| 2905 | 2905 |
| 2906 } // namespace internal | 2906 } // namespace internal |
| 2907 } // namespace v8 | 2907 } // namespace v8 |
| 2908 | 2908 |
| 2909 #endif // V8_HEAP_SPACES_H_ | 2909 #endif // V8_HEAP_SPACES_H_ |
| OLD | NEW |