Fix windows compile, again.

BUG=
R=dslomov@chromium.org

Review URL: https://codereview.chromium.org/380263002

git-svn-id: https://v8.googlecode.com/svn/branches/bleeding_edge@22331 ce2b1a6d-e550-0410-aec6-3dcde31c8c00
This commit is contained in:
hpayer@chromium.org 2014-07-10 17:13:27 +00:00
parent d0667e9755
commit cff790d0b3
3 changed files with 11 additions and 10 deletions

View File

@ -4068,20 +4068,21 @@ intptr_t MarkCompactCollector::SweepConservatively(PagedSpace* space,
int MarkCompactCollector::SweepInParallel(PagedSpace* space, int MarkCompactCollector::SweepInParallel(PagedSpace* space,
intptr_t required_freed_bytes) { int required_freed_bytes) {
PageIterator it(space); PageIterator it(space);
FreeList* free_list = space == heap()->old_pointer_space() FreeList* free_list = space == heap()->old_pointer_space()
? free_list_old_pointer_space_.get() ? free_list_old_pointer_space_.get()
: free_list_old_data_space_.get(); : free_list_old_data_space_.get();
FreeList private_free_list(space); FreeList private_free_list(space);
intptr_t max_freed = 0; int max_freed = 0;
intptr_t max_freed_overall = 0; int max_freed_overall = 0;
while (it.has_next()) { while (it.has_next()) {
Page* p = it.next(); Page* p = it.next();
if (p->TryParallelSweeping()) { if (p->TryParallelSweeping()) {
max_freed = SweepConservatively<SWEEP_IN_PARALLEL>( max_freed = static_cast<int>(SweepConservatively<SWEEP_IN_PARALLEL>(
space, &private_free_list, p); space, &private_free_list, p));
ASSERT(max_freed >= 0);
free_list->Concatenate(&private_free_list); free_list->Concatenate(&private_free_list);
if (required_freed_bytes > 0 && max_freed >= required_freed_bytes) { if (required_freed_bytes > 0 && max_freed >= required_freed_bytes) {
return max_freed; return max_freed;

View File

@ -663,7 +663,7 @@ class MarkCompactCollector {
// to a value larger than 0, then sweeping returns after a block of at least // to a value larger than 0, then sweeping returns after a block of at least
// required_freed_bytes was freed. If required_freed_bytes was set to zero // required_freed_bytes was freed. If required_freed_bytes was set to zero
// then the whole given space is swept. // then the whole given space is swept.
int SweepInParallel(PagedSpace* space, intptr_t required_freed_bytes); int SweepInParallel(PagedSpace* space, int required_freed_bytes);
void WaitUntilSweepingCompleted(); void WaitUntilSweepingCompleted();

View File

@ -2578,15 +2578,15 @@ void PagedSpace::EvictEvacuationCandidatesFromFreeLists() {
} }
HeapObject* PagedSpace::EnsureSweepingProgress(int size_in_bytes) { HeapObject* PagedSpace::EnsureSweepingProgress(
ASSERT(size_in_bytes >= 0); int size_in_bytes) {
MarkCompactCollector* collector = heap()->mark_compact_collector(); MarkCompactCollector* collector = heap()->mark_compact_collector();
if (collector->IsConcurrentSweepingInProgress(this)) { if (collector->IsConcurrentSweepingInProgress(this)) {
// If sweeping is still in progress try to sweep pages on the main thread. // If sweeping is still in progress try to sweep pages on the main thread.
intptr_t free_chunk = int free_chunk =
collector->SweepInParallel(this, size_in_bytes); collector->SweepInParallel(this, size_in_bytes);
if (free_chunk >= static_cast<intptr_t>(size_in_bytes)) { if (free_chunk >= size_in_bytes) {
HeapObject* object = free_list_.Allocate(size_in_bytes); HeapObject* object = free_list_.Allocate(size_in_bytes);
// We should be able to allocate an object here since we just freed that // We should be able to allocate an object here since we just freed that
// much memory. // much memory.