Chromium Code Reviews| 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 76 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 87 // Generates local var descriptors and sets it in 'code'. Do not call if the | 87 // Generates local var descriptors and sets it in 'code'. Do not call if the |
| 88 // local var descriptor already exists. | 88 // local var descriptor already exists. |
| 89 static void ComputeLocalVarDescriptors(const Code& code); | 89 static void ComputeLocalVarDescriptors(const Code& code); |
| 90 | 90 |
| 91 // Eagerly compiles all functions in a class. | 91 // Eagerly compiles all functions in a class. |
| 92 // | 92 // |
| 93 // Returns Error::null() if there is no compilation error. | 93 // Returns Error::null() if there is no compilation error. |
| 94 static RawError* CompileAllFunctions(const Class& cls); | 94 static RawError* CompileAllFunctions(const Class& cls); |
| 95 | 95 |
| 96 static bool always_optimize(); | 96 static bool always_optimize(); |
| 97 | |
| 98 static void AbortBackgroundCompilation(intptr_t deopt_id); | |
|
rmacnak
2016/02/08 20:24:25
Add comment that this is a transient failure for w
srdjan
2016/02/08 20:30:16
// Notify the compiler that background (optimized)
| |
| 97 }; | 99 }; |
| 98 | 100 |
| 99 | 101 |
| 100 // Class to run optimizing compilation in a background thread. | 102 // Class to run optimizing compilation in a background thread. |
| 101 // Current implementation: one task per isolate, it dies with the owning | 103 // Current implementation: one task per isolate, it dies with the owning |
| 102 // isolate. | 104 // isolate. |
| 103 // No OSR compilation in the background compiler. | 105 // No OSR compilation in the background compiler. |
| 104 class BackgroundCompiler : public ThreadPool::Task { | 106 class BackgroundCompiler : public ThreadPool::Task { |
| 105 public: | 107 public: |
| 106 static void EnsureInit(Thread* thread); | 108 static void EnsureInit(Thread* thread); |
| (...skipping 20 matching lines...) Expand all Loading... | |
| 127 Monitor* done_monitor_; // Notify/wait that the thread is done. | 129 Monitor* done_monitor_; // Notify/wait that the thread is done. |
| 128 | 130 |
| 129 BackgroundCompilationQueue* function_queue_; | 131 BackgroundCompilationQueue* function_queue_; |
| 130 | 132 |
| 131 DISALLOW_IMPLICIT_CONSTRUCTORS(BackgroundCompiler); | 133 DISALLOW_IMPLICIT_CONSTRUCTORS(BackgroundCompiler); |
| 132 }; | 134 }; |
| 133 | 135 |
| 134 } // namespace dart | 136 } // namespace dart |
| 135 | 137 |
| 136 #endif // VM_COMPILER_H_ | 138 #endif // VM_COMPILER_H_ |
| OLD | NEW |