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 32 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
43 // Generates unoptimized code if not present, current code is unchanged. | 43 // Generates unoptimized code if not present, current code is unchanged. |
44 static RawError* EnsureUnoptimizedCode(Thread* thread, | 44 static RawError* EnsureUnoptimizedCode(Thread* thread, |
45 const Function& function); | 45 const Function& function); |
46 | 46 |
47 // Generates optimized code for function. | 47 // Generates optimized code for function. |
48 // | 48 // |
49 // Returns Error::null() if there is no compilation error. | 49 // Returns Error::null() if there is no compilation error. |
50 static RawError* CompileOptimizedFunction( | 50 static RawError* CompileOptimizedFunction( |
51 Thread* thread, | 51 Thread* thread, |
52 const Function& function, | 52 const Function& function, |
53 intptr_t osr_id = Isolate::kNoDeoptId); | 53 intptr_t osr_id = Thread::kNoDeoptId); |
54 | 54 |
55 // Generates code for given parsed function (without parsing it again) and | 55 // Generates code for given parsed function (without parsing it again) and |
56 // sets its code field. | 56 // sets its code field. |
57 // | 57 // |
58 // Returns Error::null() if there is no compilation error. | 58 // Returns Error::null() if there is no compilation error. |
59 static RawError* CompileParsedFunction(ParsedFunction* parsed_function); | 59 static RawError* CompileParsedFunction(ParsedFunction* parsed_function); |
60 | 60 |
61 // Generates and executes code for a given code fragment, e.g. a | 61 // Generates and executes code for a given code fragment, e.g. a |
62 // compile time constant expression. Returns the result returned | 62 // compile time constant expression. Returns the result returned |
63 // by the fragment. | 63 // by the fragment. |
(...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
125 bool* done_; | 125 bool* done_; |
126 Monitor* monitor_; | 126 Monitor* monitor_; |
127 Monitor* done_monitor_; | 127 Monitor* done_monitor_; |
128 | 128 |
129 DISALLOW_IMPLICIT_CONSTRUCTORS(BackgroundCompiler); | 129 DISALLOW_IMPLICIT_CONSTRUCTORS(BackgroundCompiler); |
130 }; | 130 }; |
131 | 131 |
132 } // namespace dart | 132 } // namespace dart |
133 | 133 |
134 #endif // VM_COMPILER_H_ | 134 #endif // VM_COMPILER_H_ |
OLD | NEW |