| 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 54 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 65 // | 65 // |
| 66 // The return value is either a RawInstance on success or a RawError | 66 // The return value is either a RawInstance on success or a RawError |
| 67 // on compilation failure. | 67 // on compilation failure. |
| 68 static RawObject* ExecuteOnce(SequenceNode* fragment); | 68 static RawObject* ExecuteOnce(SequenceNode* fragment); |
| 69 | 69 |
| 70 // Evaluates the initializer expression of the given static field. | 70 // Evaluates the initializer expression of the given static field. |
| 71 // | 71 // |
| 72 // The return value is either a RawInstance on success or a RawError | 72 // The return value is either a RawInstance on success or a RawError |
| 73 // on compilation failure. | 73 // on compilation failure. |
| 74 static RawObject* EvaluateStaticInitializer(const Field& field); | 74 static RawObject* EvaluateStaticInitializer(const Field& field); |
| 75 static void CompileStaticInitializer(const Field& field); |
| 75 | 76 |
| 76 // Generates local var descriptors and sets it in 'code'. Do not call if the | 77 // Generates local var descriptors and sets it in 'code'. Do not call if the |
| 77 // local var descriptor already exists. | 78 // local var descriptor already exists. |
| 78 static void ComputeLocalVarDescriptors(const Code& code); | 79 static void ComputeLocalVarDescriptors(const Code& code); |
| 79 | 80 |
| 80 // Eagerly compiles all functions in a class. | 81 // Eagerly compiles all functions in a class. |
| 81 // | 82 // |
| 82 // Returns Error::null() if there is no compilation error. | 83 // Returns Error::null() if there is no compilation error. |
| 83 static RawError* CompileAllFunctions(const Class& cls); | 84 static RawError* CompileAllFunctions(const Class& cls); |
| 84 | 85 |
| (...skipping 11 matching lines...) Expand all Loading... |
| 96 } | 97 } |
| 97 | 98 |
| 98 private: | 99 private: |
| 99 static bool always_optimize_; | 100 static bool always_optimize_; |
| 100 static bool allow_recompilation_; | 101 static bool allow_recompilation_; |
| 101 }; | 102 }; |
| 102 | 103 |
| 103 } // namespace dart | 104 } // namespace dart |
| 104 | 105 |
| 105 #endif // VM_COMPILER_H_ | 106 #endif // VM_COMPILER_H_ |
| OLD | NEW |