| 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_CLASS_FINALIZER_H_ | 5 #ifndef VM_CLASS_FINALIZER_H_ |
| 6 #define VM_CLASS_FINALIZER_H_ | 6 #define VM_CLASS_FINALIZER_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 | 10 |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 90 // is an anonymous top level class). | 90 // is an anonymous top level class). |
| 91 static void FinalizeTypesInClass(const Class& cls); | 91 static void FinalizeTypesInClass(const Class& cls); |
| 92 | 92 |
| 93 // Finalize the class including its fields and functions. | 93 // Finalize the class including its fields and functions. |
| 94 static void FinalizeClass(const Class& cls); | 94 static void FinalizeClass(const Class& cls); |
| 95 | 95 |
| 96 // Verify that the classes have been properly prefinalized. This is | 96 // Verify that the classes have been properly prefinalized. This is |
| 97 // needed during bootstrapping where the classes have been preloaded. | 97 // needed during bootstrapping where the classes have been preloaded. |
| 98 static void VerifyBootstrapClasses(); | 98 static void VerifyBootstrapClasses(); |
| 99 | 99 |
| 100 // Resolve the class of the type and the class of the type's type arguments. |
| 101 static void ResolveType(const Class& cls, const AbstractType& type); |
| 102 |
| 100 // Resolve the type and target of the redirecting factory. | 103 // Resolve the type and target of the redirecting factory. |
| 101 static void ResolveRedirectingFactory(const Class& cls, | 104 static void ResolveRedirectingFactory(const Class& cls, |
| 102 const Function& factory); | 105 const Function& factory); |
| 103 | 106 |
| 104 // Apply the mixin type to the mixin application class. | 107 // Apply the mixin type to the mixin application class. |
| 105 static void ApplyMixinType(const Class& mixin_app_class, | 108 static void ApplyMixinType(const Class& mixin_app_class, |
| 106 GrowableObjectArray* pending_types = NULL); | 109 GrowableObjectArray* pending_types = NULL); |
| 107 | 110 |
| 108 private: | 111 private: |
| 109 static bool IsSuperCycleFree(const Class& cls); | 112 static bool IsSuperCycleFree(const Class& cls); |
| (...skipping 28 matching lines...) Expand all Loading... |
| 138 GrowableObjectArray* pending_types = NULL); | 141 GrowableObjectArray* pending_types = NULL); |
| 139 static void FinalizeTypeArguments(const Class& cls, | 142 static void FinalizeTypeArguments(const Class& cls, |
| 140 const AbstractTypeArguments& arguments, | 143 const AbstractTypeArguments& arguments, |
| 141 intptr_t num_uninitialized_arguments, | 144 intptr_t num_uninitialized_arguments, |
| 142 Error* bound_error, | 145 Error* bound_error, |
| 143 GrowableObjectArray* pending_types); | 146 GrowableObjectArray* pending_types); |
| 144 static void CheckTypeBounds(const Class& cls, const Type& type); | 147 static void CheckTypeBounds(const Class& cls, const Type& type); |
| 145 static void CheckTypeArgumentBounds(const Class& cls, | 148 static void CheckTypeArgumentBounds(const Class& cls, |
| 146 const AbstractTypeArguments& arguments, | 149 const AbstractTypeArguments& arguments, |
| 147 Error* bound_error); | 150 Error* bound_error); |
| 148 static void ResolveType(const Class& cls, | |
| 149 const AbstractType& type, | |
| 150 FinalizationKind finalization); | |
| 151 static void ResolveUpperBounds(const Class& cls); | 151 static void ResolveUpperBounds(const Class& cls); |
| 152 static void FinalizeUpperBounds(const Class& cls); | 152 static void FinalizeUpperBounds(const Class& cls); |
| 153 static void ResolveAndFinalizeSignature(const Class& cls, | 153 static void ResolveAndFinalizeSignature(const Class& cls, |
| 154 const Function& function); | 154 const Function& function); |
| 155 static void ResolveAndFinalizeMemberTypes(const Class& cls); | 155 static void ResolveAndFinalizeMemberTypes(const Class& cls); |
| 156 static void PrintClassInformation(const Class& cls); | 156 static void PrintClassInformation(const Class& cls); |
| 157 static void CollectInterfaces(const Class& cls, | 157 static void CollectInterfaces(const Class& cls, |
| 158 const GrowableObjectArray& interfaces); | 158 const GrowableObjectArray& interfaces); |
| 159 static void ReportMalformedType(const Error& prev_error, | 159 static void ReportMalformedType(const Error& prev_error, |
| 160 const Script& script, | 160 const Script& script, |
| 161 const Type& type, | 161 const Type& type, |
| 162 const char* format, | 162 const char* format, |
| 163 va_list args); | 163 va_list args); |
| 164 static void ReportError(const Error& error); | 164 static void ReportError(const Error& error); |
| 165 static void ReportError(const Error& prev_error, | 165 static void ReportError(const Error& prev_error, |
| 166 const Script& script, | 166 const Script& script, |
| 167 intptr_t token_index, | 167 intptr_t token_index, |
| 168 const char* format, ...) PRINTF_ATTRIBUTE(4, 5); | 168 const char* format, ...) PRINTF_ATTRIBUTE(4, 5); |
| 169 | 169 |
| 170 // Verify implicit offsets recorded in the VM for direct access to fields of | 170 // Verify implicit offsets recorded in the VM for direct access to fields of |
| 171 // Dart instances (e.g: _TypedListView, _ByteDataView). | 171 // Dart instances (e.g: _TypedListView, _ByteDataView). |
| 172 static void VerifyImplicitFieldOffsets(); | 172 static void VerifyImplicitFieldOffsets(); |
| 173 }; | 173 }; |
| 174 | 174 |
| 175 } // namespace dart | 175 } // namespace dart |
| 176 | 176 |
| 177 #endif // VM_CLASS_FINALIZER_H_ | 177 #endif // VM_CLASS_FINALIZER_H_ |
| OLD | NEW |