| 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 #include "vm/object.h" | 10 #include "vm/object.h" |
| (...skipping 24 matching lines...) Expand all Loading... |
| 35 const AbstractType& type, | 35 const AbstractType& type, |
| 36 FinalizationKind finalization, | 36 FinalizationKind finalization, |
| 37 PendingTypes* pending_types = NULL); | 37 PendingTypes* pending_types = NULL); |
| 38 | 38 |
| 39 // Allocate, finalize, and return a new malformed type as if it was declared | 39 // Allocate, finalize, and return a new malformed type as if it was declared |
| 40 // in class cls at the given token position. | 40 // in class cls at the given token position. |
| 41 // If not null, prepend prev_error to the error message built from the format | 41 // If not null, prepend prev_error to the error message built from the format |
| 42 // string and its arguments. | 42 // string and its arguments. |
| 43 static RawType* NewFinalizedMalformedType(const Error& prev_error, | 43 static RawType* NewFinalizedMalformedType(const Error& prev_error, |
| 44 const Script& script, | 44 const Script& script, |
| 45 intptr_t type_pos, | 45 TokenPosition type_pos, |
| 46 const char* format, ...) | 46 const char* format, ...) |
| 47 PRINTF_ATTRIBUTE(4, 5); | 47 PRINTF_ATTRIBUTE(4, 5); |
| 48 | 48 |
| 49 // Mark the given type as malformed. | 49 // Mark the given type as malformed. |
| 50 // If not null, prepend prev_error to the error message built from the format | 50 // If not null, prepend prev_error to the error message built from the format |
| 51 // string and its arguments. | 51 // string and its arguments. |
| 52 static void FinalizeMalformedType(const Error& prev_error, | 52 static void FinalizeMalformedType(const Error& prev_error, |
| 53 const Script& script, | 53 const Script& script, |
| 54 const Type& type, | 54 const Type& type, |
| 55 const char* format, ...) | 55 const char* format, ...) |
| (...skipping 103 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 static void CollectInterfaces( | 159 static void CollectInterfaces( |
| 160 const Class& cls, GrowableArray<const Class*>* collected); | 160 const Class& cls, GrowableArray<const Class*>* collected); |
| 161 | 161 |
| 162 static void MarkTypeMalformed(const Error& prev_error, | 162 static void MarkTypeMalformed(const Error& prev_error, |
| 163 const Script& script, | 163 const Script& script, |
| 164 const Type& type, | 164 const Type& type, |
| 165 const char* format, | 165 const char* format, |
| 166 va_list args); | 166 va_list args); |
| 167 static void ReportError(const Error& error); | 167 static void ReportError(const Error& error); |
| 168 static void ReportError(const Class& cls, | 168 static void ReportError(const Class& cls, |
| 169 intptr_t token_pos, | 169 TokenPosition token_pos, |
| 170 const char* format, ...) PRINTF_ATTRIBUTE(3, 4); | 170 const char* format, ...) PRINTF_ATTRIBUTE(3, 4); |
| 171 static void ReportErrors(const Error& prev_error, | 171 static void ReportErrors(const Error& prev_error, |
| 172 const Class& cls, | 172 const Class& cls, |
| 173 intptr_t token_pos, | 173 TokenPosition token_pos, |
| 174 const char* format, ...) PRINTF_ATTRIBUTE(4, 5); | 174 const char* format, ...) PRINTF_ATTRIBUTE(4, 5); |
| 175 | 175 |
| 176 // Verify implicit offsets recorded in the VM for direct access to fields of | 176 // Verify implicit offsets recorded in the VM for direct access to fields of |
| 177 // Dart instances (e.g: _TypedListView, _ByteDataView). | 177 // Dart instances (e.g: _TypedListView, _ByteDataView). |
| 178 static void VerifyImplicitFieldOffsets(); | 178 static void VerifyImplicitFieldOffsets(); |
| 179 }; | 179 }; |
| 180 | 180 |
| 181 } // namespace dart | 181 } // namespace dart |
| 182 | 182 |
| 183 #endif // VM_CLASS_FINALIZER_H_ | 183 #endif // VM_CLASS_FINALIZER_H_ |
| OLD | NEW |