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 63 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
74 private: | 74 private: |
75 IndirectGotoInstr* backtrack_goto_; | 75 IndirectGotoInstr* backtrack_goto_; |
76 }; | 76 }; |
77 | 77 |
78 | 78 |
79 class Compiler : public AllStatic { | 79 class Compiler : public AllStatic { |
80 public: | 80 public: |
81 static const intptr_t kNoOSRDeoptId = Thread::kNoDeoptId; | 81 static const intptr_t kNoOSRDeoptId = Thread::kNoDeoptId; |
82 | 82 |
83 static bool IsBackgroundCompilation(); | 83 static bool IsBackgroundCompilation(); |
| 84 // The result for a function may change if debugging gets turned on/off. |
| 85 static bool CanOptimizeFunction(Thread* thread, const Function& function); |
84 | 86 |
85 // Extracts top level entities from the script and populates | 87 // Extracts top level entities from the script and populates |
86 // the class dictionary of the library. | 88 // the class dictionary of the library. |
87 // | 89 // |
88 // Returns Error::null() if there is no compilation error. | 90 // Returns Error::null() if there is no compilation error. |
89 static RawError* Compile(const Library& library, const Script& script); | 91 static RawError* Compile(const Library& library, const Script& script); |
90 | 92 |
91 // Extracts function and field symbols from the class and populates | 93 // Extracts function and field symbols from the class and populates |
92 // the class. | 94 // the class. |
93 // | 95 // |
(...skipping 91 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
185 Monitor* done_monitor_; // Notify/wait that the thread is done. | 187 Monitor* done_monitor_; // Notify/wait that the thread is done. |
186 | 188 |
187 BackgroundCompilationQueue* function_queue_; | 189 BackgroundCompilationQueue* function_queue_; |
188 | 190 |
189 DISALLOW_IMPLICIT_CONSTRUCTORS(BackgroundCompiler); | 191 DISALLOW_IMPLICIT_CONSTRUCTORS(BackgroundCompiler); |
190 }; | 192 }; |
191 | 193 |
192 } // namespace dart | 194 } // namespace dart |
193 | 195 |
194 #endif // VM_COMPILER_H_ | 196 #endif // VM_COMPILER_H_ |
OLD | NEW |