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 #include "src/v8.h" | 5 #include "src/v8.h" |
6 | 6 |
7 #include "src/base/bits.h" | 7 #include "src/base/bits.h" |
8 #include "src/base/platform/platform.h" | 8 #include "src/base/platform/platform.h" |
9 #include "src/full-codegen/full-codegen.h" | 9 #include "src/full-codegen/full-codegen.h" |
10 #include "src/heap/mark-compact.h" | 10 #include "src/heap/mark-compact.h" |
(...skipping 1828 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1839 page = page->next_page(); | 1839 page = page->next_page(); |
1840 CHECK_NE(page, space->anchor()); | 1840 CHECK_NE(page, space->anchor()); |
1841 } | 1841 } |
1842 } | 1842 } |
1843 } | 1843 } |
1844 #endif | 1844 #endif |
1845 | 1845 |
1846 | 1846 |
1847 // ----------------------------------------------------------------------------- | 1847 // ----------------------------------------------------------------------------- |
1848 // SemiSpaceIterator implementation. | 1848 // SemiSpaceIterator implementation. |
| 1849 |
1849 SemiSpaceIterator::SemiSpaceIterator(NewSpace* space) { | 1850 SemiSpaceIterator::SemiSpaceIterator(NewSpace* space) { |
1850 Initialize(space->bottom(), space->top()); | 1851 Initialize(space->bottom(), space->top()); |
1851 } | 1852 } |
1852 | 1853 |
1853 | 1854 |
1854 SemiSpaceIterator::SemiSpaceIterator(NewSpace* space, Address start) { | |
1855 Initialize(start, space->top()); | |
1856 } | |
1857 | |
1858 | |
1859 SemiSpaceIterator::SemiSpaceIterator(Address from, Address to) { | |
1860 Initialize(from, to); | |
1861 } | |
1862 | |
1863 | |
1864 void SemiSpaceIterator::Initialize(Address start, Address end) { | 1855 void SemiSpaceIterator::Initialize(Address start, Address end) { |
1865 SemiSpace::AssertValidRange(start, end); | 1856 SemiSpace::AssertValidRange(start, end); |
1866 current_ = start; | 1857 current_ = start; |
1867 limit_ = end; | 1858 limit_ = end; |
1868 } | 1859 } |
1869 | 1860 |
1870 | 1861 |
1871 #ifdef DEBUG | 1862 #ifdef DEBUG |
1872 // heap_histograms is shared, always clear it before using it. | 1863 // heap_histograms is shared, always clear it before using it. |
1873 static void ClearHistograms(Isolate* isolate) { | 1864 static void ClearHistograms(Isolate* isolate) { |
(...skipping 1249 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3123 object->ShortPrint(); | 3114 object->ShortPrint(); |
3124 PrintF("\n"); | 3115 PrintF("\n"); |
3125 } | 3116 } |
3126 printf(" --------------------------------------\n"); | 3117 printf(" --------------------------------------\n"); |
3127 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); | 3118 printf(" Marked: %x, LiveCount: %x\n", mark_size, LiveBytes()); |
3128 } | 3119 } |
3129 | 3120 |
3130 #endif // DEBUG | 3121 #endif // DEBUG |
3131 } // namespace internal | 3122 } // namespace internal |
3132 } // namespace v8 | 3123 } // namespace v8 |
OLD | NEW |