| Index: src/compiler-dispatcher/compiler-dispatcher.h
|
| diff --git a/src/compiler-dispatcher/compiler-dispatcher.h b/src/compiler-dispatcher/compiler-dispatcher.h
|
| index e6737a002945175bcaaefd3bcf6d25bec2232edc..7947a448b133d26477072a1fea95bb6d75e3f954 100644
|
| --- a/src/compiler-dispatcher/compiler-dispatcher.h
|
| +++ b/src/compiler-dispatcher/compiler-dispatcher.h
|
| @@ -13,6 +13,9 @@
|
| #include "src/globals.h"
|
|
|
| namespace v8 {
|
| +
|
| +class Platform;
|
| +
|
| namespace internal {
|
|
|
| class CompilerDispatcherJob;
|
| @@ -27,7 +30,8 @@ class V8_EXPORT_PRIVATE CompilerDispatcher {
|
| public:
|
| enum class BlockingBehavior { kBlock, kDontBlock };
|
|
|
| - CompilerDispatcher(Isolate* isolate, size_t max_stack_size);
|
| + CompilerDispatcher(Isolate* isolate, Platform* platform,
|
| + size_t max_stack_size);
|
| ~CompilerDispatcher();
|
|
|
| // Returns true if a job was enqueued.
|
| @@ -50,12 +54,19 @@ class V8_EXPORT_PRIVATE CompilerDispatcher {
|
| typedef std::multimap<std::pair<int, int>,
|
| std::unique_ptr<CompilerDispatcherJob>>
|
| JobMap;
|
| + class IdleTask;
|
| +
|
| JobMap::const_iterator GetJobFor(Handle<SharedFunctionInfo> shared) const;
|
| + void ScheduleIdleTaskIfNeeded();
|
| + void DoIdleWork(double deadline_in_seconds);
|
|
|
| Isolate* isolate_;
|
| + Platform* platform_;
|
| size_t max_stack_size_;
|
| std::unique_ptr<CompilerDispatcherTracer> tracer_;
|
|
|
| + bool idle_task_scheduled_;
|
| +
|
| // Mapping from (script id, function literal id) to job. We use a multimap,
|
| // as script id is not necessarily unique.
|
| JobMap jobs_;
|
|
|