| 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/base/atomicops.h" | 7 #include "src/base/atomicops.h" |
| 8 #include "src/code-stubs.h" | 8 #include "src/code-stubs.h" |
| 9 #include "src/compilation-cache.h" | 9 #include "src/compilation-cache.h" |
| 10 #include "src/cpu-profiler.h" | 10 #include "src/cpu-profiler.h" |
| (...skipping 1991 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2002 heap()->IncrementSemiSpaceCopiedObjectSize(size); | 2002 heap()->IncrementSemiSpaceCopiedObjectSize(size); |
| 2003 } | 2003 } |
| 2004 *cells = 0; | 2004 *cells = 0; |
| 2005 } | 2005 } |
| 2006 return survivors_size; | 2006 return survivors_size; |
| 2007 } | 2007 } |
| 2008 | 2008 |
| 2009 | 2009 |
| 2010 static void DiscoverGreyObjectsInSpace(Heap* heap, MarkingDeque* marking_deque, | 2010 static void DiscoverGreyObjectsInSpace(Heap* heap, MarkingDeque* marking_deque, |
| 2011 PagedSpace* space) { | 2011 PagedSpace* space) { |
| 2012 if (space->swept_precisely()) { | 2012 PageIterator it(space); |
| 2013 HeapObjectIterator it(space); | 2013 while (it.has_next()) { |
| 2014 DiscoverGreyObjectsWithIterator(heap, marking_deque, &it); | 2014 Page* p = it.next(); |
| 2015 } else { | 2015 DiscoverGreyObjectsOnPage(marking_deque, p); |
| 2016 PageIterator it(space); | 2016 if (marking_deque->IsFull()) return; |
| 2017 while (it.has_next()) { | |
| 2018 Page* p = it.next(); | |
| 2019 DiscoverGreyObjectsOnPage(marking_deque, p); | |
| 2020 if (marking_deque->IsFull()) return; | |
| 2021 } | |
| 2022 } | 2017 } |
| 2023 } | 2018 } |
| 2024 | 2019 |
| 2025 | 2020 |
| 2026 static void DiscoverGreyObjectsInNewSpace(Heap* heap, | 2021 static void DiscoverGreyObjectsInNewSpace(Heap* heap, |
| 2027 MarkingDeque* marking_deque) { | 2022 MarkingDeque* marking_deque) { |
| 2028 NewSpace* space = heap->new_space(); | 2023 NewSpace* space = heap->new_space(); |
| 2029 NewSpacePageIterator it(space->bottom(), space->top()); | 2024 NewSpacePageIterator it(space->bottom(), space->top()); |
| 2030 while (it.has_next()) { | 2025 while (it.has_next()) { |
| 2031 NewSpacePage* page = it.next(); | 2026 NewSpacePage* page = it.next(); |
| (...skipping 2750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4782 SlotsBuffer* buffer = *buffer_address; | 4777 SlotsBuffer* buffer = *buffer_address; |
| 4783 while (buffer != NULL) { | 4778 while (buffer != NULL) { |
| 4784 SlotsBuffer* next_buffer = buffer->next(); | 4779 SlotsBuffer* next_buffer = buffer->next(); |
| 4785 DeallocateBuffer(buffer); | 4780 DeallocateBuffer(buffer); |
| 4786 buffer = next_buffer; | 4781 buffer = next_buffer; |
| 4787 } | 4782 } |
| 4788 *buffer_address = NULL; | 4783 *buffer_address = NULL; |
| 4789 } | 4784 } |
| 4790 } | 4785 } |
| 4791 } // namespace v8::internal | 4786 } // namespace v8::internal |
| OLD | NEW |