| 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 464 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 475 | 475 |
| 476 | 476 |
| 477 class MarkCompactCollector::SweeperTask : public v8::Task { | 477 class MarkCompactCollector::SweeperTask : public v8::Task { |
| 478 public: | 478 public: |
| 479 SweeperTask(Heap* heap, PagedSpace* space) : heap_(heap), space_(space) {} | 479 SweeperTask(Heap* heap, PagedSpace* space) : heap_(heap), space_(space) {} |
| 480 | 480 |
| 481 virtual ~SweeperTask() {} | 481 virtual ~SweeperTask() {} |
| 482 | 482 |
| 483 private: | 483 private: |
| 484 // v8::Task overrides. | 484 // v8::Task overrides. |
| 485 void Run() OVERRIDE { | 485 void Run() override { |
| 486 heap_->mark_compact_collector()->SweepInParallel(space_, 0); | 486 heap_->mark_compact_collector()->SweepInParallel(space_, 0); |
| 487 heap_->mark_compact_collector()->pending_sweeper_jobs_semaphore_.Signal(); | 487 heap_->mark_compact_collector()->pending_sweeper_jobs_semaphore_.Signal(); |
| 488 } | 488 } |
| 489 | 489 |
| 490 Heap* heap_; | 490 Heap* heap_; |
| 491 PagedSpace* space_; | 491 PagedSpace* space_; |
| 492 | 492 |
| 493 DISALLOW_COPY_AND_ASSIGN(SweeperTask); | 493 DISALLOW_COPY_AND_ASSIGN(SweeperTask); |
| 494 }; | 494 }; |
| 495 | 495 |
| (...skipping 4247 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4743 SlotsBuffer* buffer = *buffer_address; | 4743 SlotsBuffer* buffer = *buffer_address; |
| 4744 while (buffer != NULL) { | 4744 while (buffer != NULL) { |
| 4745 SlotsBuffer* next_buffer = buffer->next(); | 4745 SlotsBuffer* next_buffer = buffer->next(); |
| 4746 DeallocateBuffer(buffer); | 4746 DeallocateBuffer(buffer); |
| 4747 buffer = next_buffer; | 4747 buffer = next_buffer; |
| 4748 } | 4748 } |
| 4749 *buffer_address = NULL; | 4749 *buffer_address = NULL; |
| 4750 } | 4750 } |
| 4751 } | 4751 } |
| 4752 } // namespace v8::internal | 4752 } // namespace v8::internal |
| OLD | NEW |