Chromium Code Reviews| Index: src/compiler-dispatcher/compiler-dispatcher.h |
| diff --git a/src/compiler-dispatcher/compiler-dispatcher.h b/src/compiler-dispatcher/compiler-dispatcher.h |
| index 9e27439f242955106e419e97430cdbcb0303d2ec..2cb1c42c551309b77d68f12fc313b2809887783e 100644 |
| --- a/src/compiler-dispatcher/compiler-dispatcher.h |
| +++ b/src/compiler-dispatcher/compiler-dispatcher.h |
| @@ -28,8 +28,12 @@ namespace internal { |
| class CancelableTaskManager; |
| class CompilerDispatcherJob; |
| class CompilerDispatcherTracer; |
| +class CompilationInfo; |
| +class CompilationJob; |
| class Isolate; |
| +class ParseInfo; |
| class SharedFunctionInfo; |
| +class Zone; |
| template <typename T> |
| class Handle; |
| @@ -68,16 +72,28 @@ class V8_EXPORT_PRIVATE CompilerDispatcher { |
| size_t max_stack_size); |
| ~CompilerDispatcher(); |
| - // Returns true if a job was enqueued. |
| + // Returns true if the compiler dispatcher is enabled. |
| + bool IsEnabled() const; |
| + |
| + // Enqueue a job for parse and compile. Returns true if a job was enqueued. |
| bool Enqueue(Handle<SharedFunctionInfo> function); |
| + // Enqueue a job for compilation. Function must have already been parsed and |
| + // analyzed and be ready for compilation. Takes ownership of |zone|, |
| + // |parse_info|, |compile_info| and |job|. Returns true if a job was enqueued. |
| + bool Enqueue(Zone* zone, ParseInfo* parse_info, CompilationInfo* compile_info, |
|
jochen (gone - plz use gerrit)
2017/01/10 09:59:47
I wonder whether ParseInfo* and Literal* would be
rmcilroy
2017/01/12 12:31:55
I've refactored this to only need the SFI*, Litera
|
| + CompilationJob* job); |
| + |
| // Returns true if there is a pending job for the given function. |
| bool IsEnqueued(Handle<SharedFunctionInfo> function) const; |
| // Blocks until the given function is compiled (and does so as fast as |
| - // possible). Returns true if the compile job was succesful. |
| + // possible). Returns true if the compile job was successful. |
| bool FinishNow(Handle<SharedFunctionInfo> function); |
| + // Blocks until all enqueued jobs have finished. |
| + void FinishAllNow(); |
|
jochen (gone - plz use gerrit)
2017/01/10 09:59:47
just for the record, I don't think we should have
rmcilroy
2017/01/12 12:31:55
Agreed, that's going to be my next CL.
|
| + |
| // Aborts a given job. Blocks if requested. |
| void Abort(Handle<SharedFunctionInfo> function, BlockingBehavior blocking); |
| @@ -106,9 +122,10 @@ class V8_EXPORT_PRIVATE CompilerDispatcher { |
| class IdleTask; |
| void WaitForJobIfRunningOnBackground(CompilerDispatcherJob* job); |
| - bool IsEnabled() const; |
| void AbortInactiveJobs(); |
| + bool CanEnqueueJobs(); |
| JobMap::const_iterator GetJobFor(Handle<SharedFunctionInfo> shared) const; |
| + bool FinishNow(CompilerDispatcherJob* job); |
| void ConsiderJobForBackgroundProcessing(CompilerDispatcherJob* job); |
| void ScheduleMoreBackgroundTasksIfNeeded(); |
| void ScheduleIdleTaskFromAnyThread(); |