Chromium Code Reviews| Index: runtime/vm/compiler.h |
| diff --git a/runtime/vm/compiler.h b/runtime/vm/compiler.h |
| index 9dc11b810541b2fa2ad60138e3752967a475021e..137cd41f012bd2f2bcbeb7e96db8dd18c6261247 100644 |
| --- a/runtime/vm/compiler.h |
| +++ b/runtime/vm/compiler.h |
| @@ -8,6 +8,7 @@ |
| #include "vm/allocation.h" |
| #include "vm/growable_array.h" |
| #include "vm/runtime_entry.h" |
| +#include "vm/thread_pool.h" |
| namespace dart { |
| @@ -99,6 +100,32 @@ class Compiler : public AllStatic { |
| static bool allow_recompilation_; |
| }; |
| + |
| +class CompileOptimizedTask : public ThreadPool::Task { |
|
koda
2015/10/02 16:53:46
The name "task" is slightly confusing to me, since
srdjan
2015/10/02 18:19:20
Renamed to BackgroundCompiler. Why should "Isolate
koda
2015/10/02 18:58:05
Not that field; I meant the added fields/accessors
|
| + public: |
| + explicit CompileOptimizedTask(Isolate* isolate); |
| + |
| + virtual void Run(); |
| + |
| + void CompileOptimized(const Function& function); |
| + |
| + void Add(const Function& f); |
| + RawFunction* RemoveOrNull(); |
| + |
| + static void EnsureInit(Isolate* isolate); |
| + |
| + static void Stop(CompileOptimizedTask* task); |
| + |
| + private: |
| + Isolate* isolate_; |
| + bool running_; |
| + bool* done_; |
| + Monitor* monitor_; |
| + Monitor* done_monitor_; |
| + |
| + DISALLOW_IMPLICIT_CONSTRUCTORS(CompileOptimizedTask); |
| +}; |
| + |
| } // namespace dart |
| #endif // VM_COMPILER_H_ |