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 72 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
83 } | 83 } |
84 | 84 |
85 // Verify that the pending classes have been properly prefinalized. This is | 85 // Verify that the pending classes have been properly prefinalized. This is |
86 // needed during bootstrapping where the classes have been preloaded. | 86 // needed during bootstrapping where the classes have been preloaded. |
87 static void VerifyBootstrapClasses(); | 87 static void VerifyBootstrapClasses(); |
88 | 88 |
89 private: | 89 private: |
90 static bool FinalizePendingClasses(bool generating_snapshot); | 90 static bool FinalizePendingClasses(bool generating_snapshot); |
91 static void FinalizeClass(const Class& cls, bool generating_snapshot); | 91 static void FinalizeClass(const Class& cls, bool generating_snapshot); |
92 static bool IsSuperCycleFree(const Class& cls); | 92 static bool IsSuperCycleFree(const Class& cls); |
| 93 static bool IsAliasCycleFree(const Class& cls, |
| 94 GrowableArray<intptr_t>* visited); |
93 static void CheckForLegalConstClass(const Class& cls); | 95 static void CheckForLegalConstClass(const Class& cls); |
94 static RawClass* ResolveClass(const Class& cls, | 96 static RawClass* ResolveClass(const Class& cls, |
95 const UnresolvedClass& unresolved_class); | 97 const UnresolvedClass& unresolved_class); |
96 static void ResolveSuperType(const Class& cls); | 98 static void ResolveSuperType(const Class& cls); |
97 static void ResolveFactoryClass(const Class& cls); | 99 static void ResolveFactoryClass(const Class& cls); |
98 static void ResolveInterfaces(const Class& cls, | 100 static void ResolveInterfaces(const Class& cls, |
99 const GrowableObjectArray& visited); | 101 GrowableArray<intptr_t>* visited); |
100 static void FinalizeTypeParameters(const Class& cls); | 102 static void FinalizeTypeParameters(const Class& cls); |
101 static void FinalizeTypeArguments(const Class& cls, | 103 static void FinalizeTypeArguments(const Class& cls, |
102 const AbstractTypeArguments& arguments, | 104 const AbstractTypeArguments& arguments, |
103 FinalizationKind finalization); | 105 FinalizationKind finalization); |
104 static void ResolveType(const Class& cls, | 106 static void ResolveType(const Class& cls, |
105 const AbstractType& type, | 107 const AbstractType& type, |
106 FinalizationKind finalization); | 108 FinalizationKind finalization); |
107 static void ResolveAndFinalizeUpperBounds(const Class& cls); | 109 static void ResolveAndFinalizeUpperBounds(const Class& cls); |
108 static void ResolveAndFinalizeSignature(const Class& cls, | 110 static void ResolveAndFinalizeSignature(const Class& cls, |
109 const Function& function); | 111 const Function& function); |
110 static void ResolveAndFinalizeMemberTypes(const Class& cls); | 112 static void ResolveAndFinalizeMemberTypes(const Class& cls); |
111 static void PrintClassInformation(const Class& cls); | 113 static void PrintClassInformation(const Class& cls); |
112 static void VerifyClassImplements(const Class& cls); | 114 static void VerifyClassImplements(const Class& cls); |
113 static void CollectInterfaces(const Class& cls, | 115 static void CollectInterfaces(const Class& cls, |
114 const GrowableObjectArray& interfaces); | 116 const GrowableObjectArray& interfaces); |
115 static void ReportError(const Error& error); | 117 static void ReportError(const Error& error); |
116 static void ReportError(const Script& script, | 118 static void ReportError(const Script& script, |
117 intptr_t token_index, | 119 intptr_t token_index, |
118 const char* format, ...); | 120 const char* format, ...); |
119 static void ReportError(const char* format, ...); | 121 static void ReportError(const char* format, ...); |
120 }; | 122 }; |
121 | 123 |
122 } // namespace dart | 124 } // namespace dart |
123 | 125 |
124 #endif // VM_CLASS_FINALIZER_H_ | 126 #endif // VM_CLASS_FINALIZER_H_ |
OLD | NEW |