| 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 428 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 439 | 439 |
| 440 | 440 |
| 441 class MarkCompactCollector::SweeperTask : public v8::Task { | 441 class MarkCompactCollector::SweeperTask : public v8::Task { |
| 442 public: | 442 public: |
| 443 SweeperTask(Heap* heap, PagedSpace* space) : heap_(heap), space_(space) {} | 443 SweeperTask(Heap* heap, PagedSpace* space) : heap_(heap), space_(space) {} |
| 444 | 444 |
| 445 virtual ~SweeperTask() {} | 445 virtual ~SweeperTask() {} |
| 446 | 446 |
| 447 private: | 447 private: |
| 448 // v8::Task overrides. | 448 // v8::Task overrides. |
| 449 virtual void Run() OVERRIDE { | 449 void Run() OVERRIDE { |
| 450 heap_->mark_compact_collector()->SweepInParallel(space_, 0); | 450 heap_->mark_compact_collector()->SweepInParallel(space_, 0); |
| 451 heap_->mark_compact_collector()->pending_sweeper_jobs_semaphore_.Signal(); | 451 heap_->mark_compact_collector()->pending_sweeper_jobs_semaphore_.Signal(); |
| 452 } | 452 } |
| 453 | 453 |
| 454 Heap* heap_; | 454 Heap* heap_; |
| 455 PagedSpace* space_; | 455 PagedSpace* space_; |
| 456 | 456 |
| 457 DISALLOW_COPY_AND_ASSIGN(SweeperTask); | 457 DISALLOW_COPY_AND_ASSIGN(SweeperTask); |
| 458 }; | 458 }; |
| 459 | 459 |
| (...skipping 3980 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 4440 SlotsBuffer* buffer = *buffer_address; | 4440 SlotsBuffer* buffer = *buffer_address; |
| 4441 while (buffer != NULL) { | 4441 while (buffer != NULL) { |
| 4442 SlotsBuffer* next_buffer = buffer->next(); | 4442 SlotsBuffer* next_buffer = buffer->next(); |
| 4443 DeallocateBuffer(buffer); | 4443 DeallocateBuffer(buffer); |
| 4444 buffer = next_buffer; | 4444 buffer = next_buffer; |
| 4445 } | 4445 } |
| 4446 *buffer_address = NULL; | 4446 *buffer_address = NULL; |
| 4447 } | 4447 } |
| 4448 } | 4448 } |
| 4449 } // namespace v8::internal | 4449 } // namespace v8::internal |
| OLD | NEW |