| 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 60 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 71 // string and its arguments. | 71 // string and its arguments. |
| 72 static void FinalizeMalboundedType(const Error& prev_error, | 72 static void FinalizeMalboundedType(const Error& prev_error, |
| 73 const Script& script, | 73 const Script& script, |
| 74 const Type& type, | 74 const Type& type, |
| 75 const char* format, ...) | 75 const char* format, ...) |
| 76 PRINTF_ATTRIBUTE(4, 5); | 76 PRINTF_ATTRIBUTE(4, 5); |
| 77 | 77 |
| 78 // Return false if we still have classes pending to be finalized. | 78 // Return false if we still have classes pending to be finalized. |
| 79 static bool AllClassesFinalized(); | 79 static bool AllClassesFinalized(); |
| 80 | 80 |
| 81 // Return whether class finalization failed. | 81 // Return whether class interface finalization failed. |
| 82 // The function returns true if the finalization was successful. | 82 // The function returns true if the finalization was successful. |
| 83 // If finalization fails, an error message is set in the sticky error field | 83 // If finalization fails, an error message is set in the sticky error field |
| 84 // in the object store. | 84 // in the object store. |
| 85 static bool FinalizePendingClasses(); | 85 static bool FinalizePendingClassInterfaces(); |
| 86 | 86 |
| 87 // Finalize the types appearing in the declaration of class 'cls', i.e. its | 87 // Finalize the types appearing in the declaration of class 'cls', i.e. its |
| 88 // type parameters and their upper bounds, its super type and interfaces. | 88 // type parameters and their upper bounds, its super type and interfaces. |
| 89 // Note that the fields and functions have not been parsed yet (unless cls | 89 // Note that the fields and functions have not been parsed yet (unless cls |
| 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 |
| (...skipping 69 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 165 const char* format, ...) PRINTF_ATTRIBUTE(4, 5); | 165 const char* format, ...) PRINTF_ATTRIBUTE(4, 5); |
| 166 | 166 |
| 167 // Verify implicit offsets recorded in the VM for direct access to fields of | 167 // Verify implicit offsets recorded in the VM for direct access to fields of |
| 168 // Dart instances (e.g: _TypedListView, _ByteDataView). | 168 // Dart instances (e.g: _TypedListView, _ByteDataView). |
| 169 static void VerifyImplicitFieldOffsets(); | 169 static void VerifyImplicitFieldOffsets(); |
| 170 }; | 170 }; |
| 171 | 171 |
| 172 } // namespace dart | 172 } // namespace dart |
| 173 | 173 |
| 174 #endif // VM_CLASS_FINALIZER_H_ | 174 #endif // VM_CLASS_FINALIZER_H_ |
| OLD | NEW |