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" |
11 | 11 |
12 namespace dart { | 12 namespace dart { |
13 | 13 |
14 // Forward declarations. | 14 // Forward declarations. |
15 class Class; | 15 class Class; |
16 class Function; | 16 class Function; |
17 class Library; | 17 class Library; |
18 class ParsedFunction; | 18 class ParsedFunction; |
19 class RawInstance; | 19 class RawInstance; |
20 class Script; | 20 class Script; |
21 class SequenceNode; | 21 class SequenceNode; |
22 | 22 |
23 DECLARE_RUNTIME_ENTRY(CompileFunction); | |
24 | |
25 class Compiler : public AllStatic { | 23 class Compiler : public AllStatic { |
26 public: | 24 public: |
27 // Extracts top level entities from the script and populates | 25 // Extracts top level entities from the script and populates |
28 // the class dictionary of the library. | 26 // the class dictionary of the library. |
29 // | 27 // |
30 // Returns Error::null() if there is no compilation error. | 28 // Returns Error::null() if there is no compilation error. |
31 static RawError* Compile(const Library& library, const Script& script); | 29 static RawError* Compile(const Library& library, const Script& script); |
32 | 30 |
33 // Extracts function and field symbols from the class and populates | 31 // Extracts function and field symbols from the class and populates |
34 // the class. | 32 // the class. |
(...skipping 62 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
97 } | 95 } |
98 | 96 |
99 private: | 97 private: |
100 static bool always_optimize_; | 98 static bool always_optimize_; |
101 static bool allow_recompilation_; | 99 static bool allow_recompilation_; |
102 }; | 100 }; |
103 | 101 |
104 } // namespace dart | 102 } // namespace dart |
105 | 103 |
106 #endif // VM_COMPILER_H_ | 104 #endif // VM_COMPILER_H_ |
OLD | NEW |