| 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/base/bits.h" | 8 #include "src/base/bits.h" |
| 9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
| 10 #include "src/compilation-cache.h" | 10 #include "src/compilation-cache.h" |
| (...skipping 443 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 454 } | 454 } |
| 455 | 455 |
| 456 Heap* heap_; | 456 Heap* heap_; |
| 457 PagedSpace* space_; | 457 PagedSpace* space_; |
| 458 | 458 |
| 459 DISALLOW_COPY_AND_ASSIGN(SweeperTask); | 459 DISALLOW_COPY_AND_ASSIGN(SweeperTask); |
| 460 }; | 460 }; |
| 461 | 461 |
| 462 | 462 |
| 463 void MarkCompactCollector::StartSweeperThreads() { | 463 void MarkCompactCollector::StartSweeperThreads() { |
| 464 DCHECK(!FLAG_single_threaded); |
| 464 DCHECK(free_list_old_pointer_space_.get()->IsEmpty()); | 465 DCHECK(free_list_old_pointer_space_.get()->IsEmpty()); |
| 465 DCHECK(free_list_old_data_space_.get()->IsEmpty()); | 466 DCHECK(free_list_old_data_space_.get()->IsEmpty()); |
| 466 V8::GetCurrentPlatform()->CallOnBackgroundThread( | 467 V8::GetCurrentPlatform()->CallOnBackgroundThread( |
| 467 new SweeperTask(heap(), heap()->old_data_space()), | 468 new SweeperTask(heap(), heap()->old_data_space()), |
| 468 v8::Platform::kShortRunningTask); | 469 v8::Platform::kShortRunningTask); |
| 469 V8::GetCurrentPlatform()->CallOnBackgroundThread( | 470 V8::GetCurrentPlatform()->CallOnBackgroundThread( |
| 470 new SweeperTask(heap(), heap()->old_pointer_space()), | 471 new SweeperTask(heap(), heap()->old_pointer_space()), |
| 471 v8::Platform::kShortRunningTask); | 472 v8::Platform::kShortRunningTask); |
| 472 } | 473 } |
| 473 | 474 |
| (...skipping 3939 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4413 SlotsBuffer* buffer = *buffer_address; | 4414 SlotsBuffer* buffer = *buffer_address; |
| 4414 while (buffer != NULL) { | 4415 while (buffer != NULL) { |
| 4415 SlotsBuffer* next_buffer = buffer->next(); | 4416 SlotsBuffer* next_buffer = buffer->next(); |
| 4416 DeallocateBuffer(buffer); | 4417 DeallocateBuffer(buffer); |
| 4417 buffer = next_buffer; | 4418 buffer = next_buffer; |
| 4418 } | 4419 } |
| 4419 *buffer_address = NULL; | 4420 *buffer_address = NULL; |
| 4420 } | 4421 } |
| 4421 } | 4422 } |
| 4422 } // namespace v8::internal | 4423 } // namespace v8::internal |
| OLD | NEW |