Index: src/heap/concurrent-marking.h |
diff --git a/src/heap/concurrent-marking.h b/src/heap/concurrent-marking.h |
index 349b844d67d08aeb0da9104628cc2bebb67c9bae..70842cd230d01c13810026bd5c28f4c6a0aa2c1a 100644 |
--- a/src/heap/concurrent-marking.h |
+++ b/src/heap/concurrent-marking.h |
@@ -5,9 +5,10 @@ |
#ifndef V8_HEAP_CONCURRENT_MARKING_ |
#define V8_HEAP_CONCURRENT_MARKING_ |
+#include <vector> |
+ |
#include "src/allocation.h" |
#include "src/cancelable-task.h" |
-#include "src/locked-queue.h" |
#include "src/utils.h" |
#include "src/v8.h" |
@@ -19,27 +20,19 @@ class Isolate; |
class ConcurrentMarking { |
public: |
- static const int kMaxNumberOfTasks = 10; |
- |
explicit ConcurrentMarking(Heap* heap); |
~ConcurrentMarking(); |
- void EnqueueObject(HeapObject* object); |
- bool IsQueueEmpty(); |
+ void AddRoot(HeapObject* object); |
- void StartMarkingTasks(int number_of_tasks); |
- void WaitForTasksToComplete(); |
+ void StartMarkingTask(); |
+ void WaitForTaskToComplete(); |
private: |
class Task; |
- // TODO(ulan): Replace with faster queue. |
- typedef LockedQueue<HeapObject*> Queue; |
- |
Heap* heap_; |
- base::Semaphore pending_tasks_; |
- Queue queue_; |
- int number_of_tasks_; |
- uint32_t task_ids_[kMaxNumberOfTasks]; |
+ base::Semaphore pending_task_; |
+ std::vector<HeapObject*> root_set_; |
}; |
} // namespace internal |