| OLD | NEW |
| 1 // Copyright (c) 2011, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2011, 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 |
| 11 namespace dart { | 11 namespace dart { |
| 12 | 12 |
| 13 class AbstractType; | 13 class AbstractType; |
| 14 class AbstractTypeArguments; |
| 14 class Class; | 15 class Class; |
| 15 class Function; | 16 class Function; |
| 16 class RawAbstractType; | 17 class RawAbstractType; |
| 17 class RawClass; | 18 class RawClass; |
| 18 class RawType; | 19 class RawType; |
| 19 class Script; | 20 class Script; |
| 20 class String; | 21 class String; |
| 21 class Type; | 22 class Type; |
| 22 class TypeArguments; | |
| 23 class UnresolvedClass; | 23 class UnresolvedClass; |
| 24 | 24 |
| 25 // Traverses all pending, unfinalized classes, validates and marks them as | 25 // Traverses all pending, unfinalized classes, validates and marks them as |
| 26 // finalized. | 26 // finalized. |
| 27 class ClassFinalizer : public AllStatic { | 27 class ClassFinalizer : public AllStatic { |
| 28 public: | 28 public: |
| 29 enum { | 29 enum { |
| 30 kGeneratingSnapshot = true, | 30 kGeneratingSnapshot = true, |
| 31 kNotGeneratingSnapshot = false | 31 kNotGeneratingSnapshot = false |
| 32 }; | 32 }; |
| (...skipping 38 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 static void FinalizeClass(const Class& cls, bool generating_snapshot); | 71 static void FinalizeClass(const Class& cls, bool generating_snapshot); |
| 72 static bool IsSuperCycleFree(const Class& cls); | 72 static bool IsSuperCycleFree(const Class& cls); |
| 73 static void CheckForLegalConstClass(const Class& cls); | 73 static void CheckForLegalConstClass(const Class& cls); |
| 74 static RawClass* ResolveClass(const Class& cls, | 74 static RawClass* ResolveClass(const Class& cls, |
| 75 const UnresolvedClass& unresolved_class); | 75 const UnresolvedClass& unresolved_class); |
| 76 static void ResolveSuperType(const Class& cls); | 76 static void ResolveSuperType(const Class& cls); |
| 77 static void ResolveFactoryClass(const Class& cls); | 77 static void ResolveFactoryClass(const Class& cls); |
| 78 static void ResolveInterfaces(const Class& cls, | 78 static void ResolveInterfaces(const Class& cls, |
| 79 GrowableArray<const Class*>* visited); | 79 GrowableArray<const Class*>* visited); |
| 80 static void FinalizeTypeArguments(const Class& cls, | 80 static void FinalizeTypeArguments(const Class& cls, |
| 81 const TypeArguments& arguments); | 81 const AbstractTypeArguments& arguments); |
| 82 static void ResolveType(const Class& cls, const AbstractType& type); | 82 static void ResolveType(const Class& cls, const AbstractType& type); |
| 83 static RawAbstractType* FinalizeType(const AbstractType& type); | 83 static RawAbstractType* FinalizeType(const AbstractType& type); |
| 84 static void ResolveAndFinalizeUpperBounds(const Class& cls); | 84 static void ResolveAndFinalizeUpperBounds(const Class& cls); |
| 85 static void VerifyUpperBounds(const Class& cls, | 85 static void VerifyUpperBounds(const Class& cls, |
| 86 const TypeArguments& arguments); | 86 const AbstractTypeArguments& arguments); |
| 87 static void ResolveAndFinalizeSignature(const Class& cls, | 87 static void ResolveAndFinalizeSignature(const Class& cls, |
| 88 const Function& function); | 88 const Function& function); |
| 89 static void ResolveAndFinalizeMemberTypes(const Class& cls); | 89 static void ResolveAndFinalizeMemberTypes(const Class& cls); |
| 90 static void PrintClassInformation(const Class& cls); | 90 static void PrintClassInformation(const Class& cls); |
| 91 static void VerifyClassImplements(const Class& cls); | 91 static void VerifyClassImplements(const Class& cls); |
| 92 static void CollectInterfaces(const Class& cls, | 92 static void CollectInterfaces(const Class& cls, |
| 93 GrowableArray<const Class*>* interfaces); | 93 GrowableArray<const Class*>* interfaces); |
| 94 static void ReportError(const Script& script, | 94 static void ReportError(const Script& script, |
| 95 intptr_t token_index, | 95 intptr_t token_index, |
| 96 const char* format, ...); | 96 const char* format, ...); |
| 97 static void ReportError(const char* format, ...); | 97 static void ReportError(const char* format, ...); |
| 98 static void ReportWarning(const Script& script, | 98 static void ReportWarning(const Script& script, |
| 99 intptr_t token_index, | 99 intptr_t token_index, |
| 100 const char* format, ...); | 100 const char* format, ...); |
| 101 }; | 101 }; |
| 102 | 102 |
| 103 } // namespace dart | 103 } // namespace dart |
| 104 | 104 |
| 105 #endif // VM_CLASS_FINALIZER_H_ | 105 #endif // VM_CLASS_FINALIZER_H_ |
| OLD | NEW |