Chromium Code Reviews| 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 58 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 69 | 69 |
| 70 // Return false if we still have classes pending to be finalized. | 70 // Return false if we still have classes pending to be finalized. |
| 71 static bool AllClassesFinalized(); | 71 static bool AllClassesFinalized(); |
| 72 | 72 |
| 73 // Return whether class finalization failed. | 73 // Return whether class finalization failed. |
| 74 // The function returns true if the finalization was successful. | 74 // The function returns true if the finalization was successful. |
| 75 // If finalization fails, an error message is set in the sticky error field | 75 // If finalization fails, an error message is set in the sticky error field |
| 76 // in the object store. | 76 // in the object store. |
| 77 static bool FinalizePendingClasses(); | 77 static bool FinalizePendingClasses(); |
| 78 | 78 |
| 79 // Finalize the types appearing in the declaration of class cls, i.e. its | |
|
siva
2013/08/12 02:56:43
class 'cls',
regis
2013/08/12 17:45:27
Done.
| |
| 80 // type parameters and their upper bounds, its super type and interfaces. | |
| 81 // Note that the fields and functions have not been parsed yet (unless cls | |
| 82 // is an anonymous top level class). | |
| 79 static void FinalizeTypesInClass(const Class& cls); | 83 static void FinalizeTypesInClass(const Class& cls); |
| 80 | 84 |
| 85 // Finalize the class including its fields and functions. | |
| 81 static void FinalizeClass(const Class& cls); | 86 static void FinalizeClass(const Class& cls); |
| 82 | 87 |
| 83 // Verify that the classes have been properly prefinalized. This is | 88 // Verify that the classes have been properly prefinalized. This is |
| 84 // needed during bootstrapping where the classes have been preloaded. | 89 // needed during bootstrapping where the classes have been preloaded. |
| 85 static void VerifyBootstrapClasses(); | 90 static void VerifyBootstrapClasses(); |
| 86 | 91 |
| 87 // Resolve the type and target of the redirecting factory. | 92 // Resolve the type and target of the redirecting factory. |
| 88 static void ResolveRedirectingFactory(const Class& cls, | 93 static void ResolveRedirectingFactory(const Class& cls, |
| 89 const Function& factory); | 94 const Function& factory); |
| 90 | 95 |
| (...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 134 static void ResolveAndFinalizeMemberTypes(const Class& cls); | 139 static void ResolveAndFinalizeMemberTypes(const Class& cls); |
| 135 static void PrintClassInformation(const Class& cls); | 140 static void PrintClassInformation(const Class& cls); |
| 136 static void CollectInterfaces(const Class& cls, | 141 static void CollectInterfaces(const Class& cls, |
| 137 const GrowableObjectArray& interfaces); | 142 const GrowableObjectArray& interfaces); |
| 138 static void ReportMalformedType(const Error& prev_error, | 143 static void ReportMalformedType(const Error& prev_error, |
| 139 const Class& cls, | 144 const Class& cls, |
| 140 const Type& type, | 145 const Type& type, |
| 141 const char* format, | 146 const char* format, |
| 142 va_list args); | 147 va_list args); |
| 143 static void ReportError(const Error& error); | 148 static void ReportError(const Error& error); |
| 144 static void ReportError(const Script& script, | 149 static void ReportError(const Error& prev_error, |
| 150 const Script& script, | |
| 145 intptr_t token_index, | 151 intptr_t token_index, |
| 146 const char* format, ...) PRINTF_ATTRIBUTE(3, 4); | 152 const char* format, ...) PRINTF_ATTRIBUTE(4, 5); |
| 147 static void ReportError(const char* format, ...) PRINTF_ATTRIBUTE(1, 2); | 153 static void ReportError(const char* format, ...) PRINTF_ATTRIBUTE(1, 2); |
| 148 | 154 |
| 149 // Verify implicit offsets recorded in the VM for direct access to fields of | 155 // Verify implicit offsets recorded in the VM for direct access to fields of |
| 150 // Dart instances (e.g: _TypedListView, _ByteDataView). | 156 // Dart instances (e.g: _TypedListView, _ByteDataView). |
| 151 static void VerifyImplicitFieldOffsets(); | 157 static void VerifyImplicitFieldOffsets(); |
| 152 }; | 158 }; |
| 153 | 159 |
| 154 } // namespace dart | 160 } // namespace dart |
| 155 | 161 |
| 156 #endif // VM_CLASS_FINALIZER_H_ | 162 #endif // VM_CLASS_FINALIZER_H_ |
| OLD | NEW |