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 128 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
139 | 139 |
140 // Eagerly compiles all functions in a class. | 140 // Eagerly compiles all functions in a class. |
141 // | 141 // |
142 // Returns Error::null() if there is no compilation error. | 142 // Returns Error::null() if there is no compilation error. |
143 static RawError* CompileAllFunctions(const Class& cls); | 143 static RawError* CompileAllFunctions(const Class& cls); |
144 | 144 |
145 // Notify the compiler that background (optimized) compilation has failed | 145 // Notify the compiler that background (optimized) compilation has failed |
146 // because the mutator thread changed the state (e.g., deoptimization, | 146 // because the mutator thread changed the state (e.g., deoptimization, |
147 // deferred loading). The background compilation may retry to compile | 147 // deferred loading). The background compilation may retry to compile |
148 // the same function later. | 148 // the same function later. |
149 static void AbortBackgroundCompilation(intptr_t deopt_id); | 149 static void AbortBackgroundCompilation(intptr_t deopt_id, |
| 150 const char* msg = ""); |
150 }; | 151 }; |
151 | 152 |
152 | 153 |
153 // Class to run optimizing compilation in a background thread. | 154 // Class to run optimizing compilation in a background thread. |
154 // Current implementation: one task per isolate, it dies with the owning | 155 // Current implementation: one task per isolate, it dies with the owning |
155 // isolate. | 156 // isolate. |
156 // No OSR compilation in the background compiler. | 157 // No OSR compilation in the background compiler. |
157 class BackgroundCompiler : public ThreadPool::Task { | 158 class BackgroundCompiler : public ThreadPool::Task { |
158 public: | 159 public: |
159 virtual ~BackgroundCompiler(); | 160 virtual ~BackgroundCompiler(); |
(...skipping 23 matching lines...) Expand all Loading... |
183 Monitor* done_monitor_; // Notify/wait that the thread is done. | 184 Monitor* done_monitor_; // Notify/wait that the thread is done. |
184 | 185 |
185 BackgroundCompilationQueue* function_queue_; | 186 BackgroundCompilationQueue* function_queue_; |
186 | 187 |
187 DISALLOW_IMPLICIT_CONSTRUCTORS(BackgroundCompiler); | 188 DISALLOW_IMPLICIT_CONSTRUCTORS(BackgroundCompiler); |
188 }; | 189 }; |
189 | 190 |
190 } // namespace dart | 191 } // namespace dart |
191 | 192 |
192 #endif // VM_COMPILER_H_ | 193 #endif // VM_COMPILER_H_ |
OLD | NEW |