| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 #ifndef VM_COMPILER_H_ | 5 #ifndef VM_COMPILER_H_ |
| 6 #define VM_COMPILER_H_ | 6 #define VM_COMPILER_H_ |
| 7 | 7 |
| 8 #include "vm/allocation.h" | 8 #include "vm/allocation.h" |
| 9 #include "vm/growable_array.h" | 9 #include "vm/growable_array.h" |
| 10 #include "vm/runtime_entry.h" | 10 #include "vm/runtime_entry.h" |
| (...skipping 138 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 149 static void AbortBackgroundCompilation(intptr_t deopt_id); | 149 static void AbortBackgroundCompilation(intptr_t deopt_id); |
| 150 }; | 150 }; |
| 151 | 151 |
| 152 | 152 |
| 153 // Class to run optimizing compilation in a background thread. | 153 // Class to run optimizing compilation in a background thread. |
| 154 // Current implementation: one task per isolate, it dies with the owning | 154 // Current implementation: one task per isolate, it dies with the owning |
| 155 // isolate. | 155 // isolate. |
| 156 // No OSR compilation in the background compiler. | 156 // No OSR compilation in the background compiler. |
| 157 class BackgroundCompiler : public ThreadPool::Task { | 157 class BackgroundCompiler : public ThreadPool::Task { |
| 158 public: | 158 public: |
| 159 virtual ~BackgroundCompiler(); |
| 160 |
| 159 static void EnsureInit(Thread* thread); | 161 static void EnsureInit(Thread* thread); |
| 160 | 162 |
| 161 static void Stop(BackgroundCompiler* task); | 163 static void Stop(BackgroundCompiler* task); |
| 162 | 164 |
| 163 // Call to optimize a function in the background, enters the function in the | 165 // Call to optimize a function in the background, enters the function in the |
| 164 // compilation queue. | 166 // compilation queue. |
| 165 void CompileOptimized(const Function& function); | 167 void CompileOptimized(const Function& function); |
| 166 | 168 |
| 167 void VisitPointers(ObjectPointerVisitor* visitor); | 169 void VisitPointers(ObjectPointerVisitor* visitor); |
| 168 | 170 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 180 Monitor* done_monitor_; // Notify/wait that the thread is done. | 182 Monitor* done_monitor_; // Notify/wait that the thread is done. |
| 181 | 183 |
| 182 BackgroundCompilationQueue* function_queue_; | 184 BackgroundCompilationQueue* function_queue_; |
| 183 | 185 |
| 184 DISALLOW_IMPLICIT_CONSTRUCTORS(BackgroundCompiler); | 186 DISALLOW_IMPLICIT_CONSTRUCTORS(BackgroundCompiler); |
| 185 }; | 187 }; |
| 186 | 188 |
| 187 } // namespace dart | 189 } // namespace dart |
| 188 | 190 |
| 189 #endif // VM_COMPILER_H_ | 191 #endif // VM_COMPILER_H_ |
| OLD | NEW |