| 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 82 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 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, but not the type's type arguments. | 100 // Resolve the class of the type, but not the type's type arguments. |
| 101 static void ResolveTypeClass(const Class& cls, const AbstractType& type); | 101 static void ResolveTypeClass(const Class& cls, const AbstractType& type); |
| 102 | 102 |
| 103 // Resolve the class of the type and the class of the type's type arguments. | |
| 104 static void ResolveType(const Class& cls, const AbstractType& type); | |
| 105 | |
| 106 // Resolve the type and target of the redirecting factory. | 103 // Resolve the type and target of the redirecting factory. |
| 107 static void ResolveRedirectingFactory(const Class& cls, | 104 static void ResolveRedirectingFactory(const Class& cls, |
| 108 const Function& factory); | 105 const Function& factory); |
| 109 | 106 |
| 110 // Apply the mixin type to the mixin application class. | 107 // Apply the mixin type to the mixin application class. |
| 111 static void ApplyMixinType(const Class& mixin_app_class, | 108 static void ApplyMixinType(const Class& mixin_app_class, |
| 112 GrowableObjectArray* pending_types = NULL); | 109 GrowableObjectArray* pending_types = NULL); |
| 113 | 110 |
| 114 private: | 111 private: |
| 115 static bool IsSuperCycleFree(const Class& cls); | 112 static bool IsSuperCycleFree(const Class& cls); |
| 116 static bool IsTypeCycleFree(const Class& cls, | 113 static bool IsTypeCycleFree(const Class& cls, |
| 117 const AbstractType& type, | 114 const AbstractType& type, |
| 118 GrowableArray<intptr_t>* visited); | 115 GrowableArray<intptr_t>* visited); |
| 119 static bool IsAliasCycleFree(const Class& cls, | 116 static bool IsAliasCycleFree(const Class& cls, |
| 120 GrowableArray<intptr_t>* visited); | 117 GrowableArray<intptr_t>* visited); |
| 121 static bool IsMixinCycleFree(const Class& cls, | 118 static bool IsMixinCycleFree(const Class& cls, |
| 122 GrowableArray<intptr_t>* visited); | 119 GrowableArray<intptr_t>* visited); |
| 123 static void CheckForLegalConstClass(const Class& cls); | 120 static void CheckForLegalConstClass(const Class& cls); |
| 124 static RawClass* ResolveClass(const Class& cls, | 121 static RawClass* ResolveClass(const Class& cls, |
| 125 const UnresolvedClass& unresolved_class); | 122 const UnresolvedClass& unresolved_class); |
| 123 static void ResolveType(const Class& cls, const AbstractType& type); |
| 126 static void ResolveRedirectingFactoryTarget( | 124 static void ResolveRedirectingFactoryTarget( |
| 127 const Class& cls, | 125 const Class& cls, |
| 128 const Function& factory, | 126 const Function& factory, |
| 129 const GrowableObjectArray& visited_factories); | 127 const GrowableObjectArray& visited_factories); |
| 130 static void CloneMixinAppTypeParameters(const Class& mixin_app_class); | 128 static void CloneMixinAppTypeParameters(const Class& mixin_app_class); |
| 131 static void ApplyMixinAppAlias(const Class& mixin_app_class, | 129 static void ApplyMixinAppAlias(const Class& mixin_app_class, |
| 132 bool has_uninstantiated_bounds); | 130 bool has_uninstantiated_bounds); |
| 133 static void ApplyMixinMembers(const Class& cls); | 131 static void ApplyMixinMembers(const Class& cls); |
| 134 static void CreateForwardingConstructors( | 132 static void CreateForwardingConstructors( |
| 135 const Class& mixin_app, | 133 const Class& mixin_app, |
| (...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 172 const char* format, ...) PRINTF_ATTRIBUTE(4, 5); | 170 const char* format, ...) PRINTF_ATTRIBUTE(4, 5); |
| 173 | 171 |
| 174 // Verify implicit offsets recorded in the VM for direct access to fields of | 172 // Verify implicit offsets recorded in the VM for direct access to fields of |
| 175 // Dart instances (e.g: _TypedListView, _ByteDataView). | 173 // Dart instances (e.g: _TypedListView, _ByteDataView). |
| 176 static void VerifyImplicitFieldOffsets(); | 174 static void VerifyImplicitFieldOffsets(); |
| 177 }; | 175 }; |
| 178 | 176 |
| 179 } // namespace dart | 177 } // namespace dart |
| 180 | 178 |
| 181 #endif // VM_CLASS_FINALIZER_H_ | 179 #endif // VM_CLASS_FINALIZER_H_ |
| OLD | NEW |