| OLD | NEW |
| 1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 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 #ifndef V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_H_ | 5 #ifndef V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_H_ |
| 6 #define V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_H_ | 6 #define V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_H_ |
| 7 | 7 |
| 8 #include <map> | 8 #include <map> |
| 9 #include <memory> | 9 #include <memory> |
| 10 #include <utility> | 10 #include <utility> |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 54 void AbortAll(BlockingBehavior blocking); | 54 void AbortAll(BlockingBehavior blocking); |
| 55 | 55 |
| 56 private: | 56 private: |
| 57 FRIEND_TEST(CompilerDispatcherTest, IdleTaskSmallIdleTime); | 57 FRIEND_TEST(CompilerDispatcherTest, IdleTaskSmallIdleTime); |
| 58 | 58 |
| 59 typedef std::multimap<std::pair<int, int>, | 59 typedef std::multimap<std::pair<int, int>, |
| 60 std::unique_ptr<CompilerDispatcherJob>> | 60 std::unique_ptr<CompilerDispatcherJob>> |
| 61 JobMap; | 61 JobMap; |
| 62 class IdleTask; | 62 class IdleTask; |
| 63 | 63 |
| 64 bool IsEnabled() const; | |
| 65 JobMap::const_iterator GetJobFor(Handle<SharedFunctionInfo> shared) const; | 64 JobMap::const_iterator GetJobFor(Handle<SharedFunctionInfo> shared) const; |
| 66 void ScheduleIdleTaskIfNeeded(); | 65 void ScheduleIdleTaskIfNeeded(); |
| 67 void DoIdleWork(double deadline_in_seconds); | 66 void DoIdleWork(double deadline_in_seconds); |
| 68 | 67 |
| 69 Isolate* isolate_; | 68 Isolate* isolate_; |
| 70 Platform* platform_; | 69 Platform* platform_; |
| 71 size_t max_stack_size_; | 70 size_t max_stack_size_; |
| 72 std::unique_ptr<CompilerDispatcherTracer> tracer_; | 71 std::unique_ptr<CompilerDispatcherTracer> tracer_; |
| 73 | 72 |
| 74 bool idle_task_scheduled_; | 73 bool idle_task_scheduled_; |
| 75 | 74 |
| 76 // Mapping from (script id, function literal id) to job. We use a multimap, | 75 // Mapping from (script id, function literal id) to job. We use a multimap, |
| 77 // as script id is not necessarily unique. | 76 // as script id is not necessarily unique. |
| 78 JobMap jobs_; | 77 JobMap jobs_; |
| 79 | 78 |
| 80 DISALLOW_COPY_AND_ASSIGN(CompilerDispatcher); | 79 DISALLOW_COPY_AND_ASSIGN(CompilerDispatcher); |
| 81 }; | 80 }; |
| 82 | 81 |
| 83 } // namespace internal | 82 } // namespace internal |
| 84 } // namespace v8 | 83 } // namespace v8 |
| 85 | 84 |
| 86 #endif // V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_H_ | 85 #endif // V8_COMPILER_DISPATCHER_COMPILER_DISPATCHER_H_ |
| OLD | NEW |