| 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 522 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 533 | 533 |
| 534 | 534 |
| 535 class MarkCompactCollector::SweeperTask : public v8::Task { | 535 class MarkCompactCollector::SweeperTask : public v8::Task { |
| 536 public: | 536 public: |
| 537 SweeperTask(Heap* heap, PagedSpace* space) : heap_(heap), space_(space) {} | 537 SweeperTask(Heap* heap, PagedSpace* space) : heap_(heap), space_(space) {} |
| 538 | 538 |
| 539 virtual ~SweeperTask() {} | 539 virtual ~SweeperTask() {} |
| 540 | 540 |
| 541 private: | 541 private: |
| 542 // v8::Task overrides. | 542 // v8::Task overrides. |
| 543 virtual void Run() V8_OVERRIDE { | 543 virtual void Run() OVERRIDE { |
| 544 heap_->mark_compact_collector()->SweepInParallel(space_, 0); | 544 heap_->mark_compact_collector()->SweepInParallel(space_, 0); |
| 545 heap_->mark_compact_collector()->pending_sweeper_jobs_semaphore_.Signal(); | 545 heap_->mark_compact_collector()->pending_sweeper_jobs_semaphore_.Signal(); |
| 546 } | 546 } |
| 547 | 547 |
| 548 Heap* heap_; | 548 Heap* heap_; |
| 549 PagedSpace* space_; | 549 PagedSpace* space_; |
| 550 | 550 |
| 551 DISALLOW_COPY_AND_ASSIGN(SweeperTask); | 551 DISALLOW_COPY_AND_ASSIGN(SweeperTask); |
| 552 }; | 552 }; |
| 553 | 553 |
| (...skipping 3999 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4553 SlotsBuffer* buffer = *buffer_address; | 4553 SlotsBuffer* buffer = *buffer_address; |
| 4554 while (buffer != NULL) { | 4554 while (buffer != NULL) { |
| 4555 SlotsBuffer* next_buffer = buffer->next(); | 4555 SlotsBuffer* next_buffer = buffer->next(); |
| 4556 DeallocateBuffer(buffer); | 4556 DeallocateBuffer(buffer); |
| 4557 buffer = next_buffer; | 4557 buffer = next_buffer; |
| 4558 } | 4558 } |
| 4559 *buffer_address = NULL; | 4559 *buffer_address = NULL; |
| 4560 } | 4560 } |
| 4561 } | 4561 } |
| 4562 } // namespace v8::internal | 4562 } // namespace v8::internal |
| OLD | NEW |