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 45 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
56 static RawError* CompileParsedFunction(ParsedFunction* parsed_function); | 56 static RawError* CompileParsedFunction(ParsedFunction* parsed_function); |
57 | 57 |
58 // Generates and executes code for a given code fragment, e.g. a | 58 // Generates and executes code for a given code fragment, e.g. a |
59 // compile time constant expression. Returns the result returned | 59 // compile time constant expression. Returns the result returned |
60 // by the fragment. | 60 // by the fragment. |
61 // | 61 // |
62 // The return value is either a RawInstance on success or a RawError | 62 // The return value is either a RawInstance on success or a RawError |
63 // on compilation failure. | 63 // on compilation failure. |
64 static RawObject* ExecuteOnce(SequenceNode* fragment); | 64 static RawObject* ExecuteOnce(SequenceNode* fragment); |
65 | 65 |
| 66 // Evaluates the initializer expression of the given static field. |
| 67 // |
| 68 // The return value is either a RawInstance on success or a RawError |
| 69 // on compilation failure. |
| 70 static RawObject* EvaluateStaticInitializer(const Field& field); |
| 71 |
66 // Eagerly compiles all functions in a class. | 72 // Eagerly compiles all functions in a class. |
67 // | 73 // |
68 // Returns Error::null() if there is no compilation error. | 74 // Returns Error::null() if there is no compilation error. |
69 static RawError* CompileAllFunctions(const Class& cls); | 75 static RawError* CompileAllFunctions(const Class& cls); |
70 }; | 76 }; |
71 | 77 |
72 } // namespace dart | 78 } // namespace dart |
73 | 79 |
74 #endif // VM_COMPILER_H_ | 80 #endif // VM_COMPILER_H_ |
OLD | NEW |