Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(161)

Side by Side Diff: runtime/vm/class_finalizer.h

Issue 2643523002: Implement generic function type syntax in the VM (fixes #27966). (Closed)
Patch Set: refactor parsing of formal parameter per review request Created 3 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | runtime/vm/class_finalizer.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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 RUNTIME_VM_CLASS_FINALIZER_H_ 5 #ifndef RUNTIME_VM_CLASS_FINALIZER_H_
6 #define RUNTIME_VM_CLASS_FINALIZER_H_ 6 #define RUNTIME_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 17 matching lines...) Expand all
28 // canonicalization are required. 28 // canonicalization are required.
29 }; 29 };
30 30
31 // Finalize given type while parsing class cls. 31 // Finalize given type while parsing class cls.
32 // Also canonicalize type if applicable. 32 // Also canonicalize type if applicable.
33 static RawAbstractType* FinalizeType(const Class& cls, 33 static RawAbstractType* FinalizeType(const Class& cls,
34 const AbstractType& type, 34 const AbstractType& type,
35 FinalizationKind finalization, 35 FinalizationKind finalization,
36 PendingTypes* pending_types = NULL); 36 PendingTypes* pending_types = NULL);
37 37
38 // Finalize the types in the functions's signature while parsing class cls.
39 static void FinalizeSignature(const Class& cls, const Function& function);
40
38 // Allocate, finalize, and return a new malformed type as if it was declared 41 // Allocate, finalize, and return a new malformed type as if it was declared
39 // in class cls at the given token position. 42 // in class cls at the given token position.
40 // If not null, prepend prev_error to the error message built from the format 43 // If not null, prepend prev_error to the error message built from the format
41 // string and its arguments. 44 // string and its arguments.
42 static RawType* NewFinalizedMalformedType(const Error& prev_error, 45 static RawType* NewFinalizedMalformedType(const Error& prev_error,
43 const Script& script, 46 const Script& script,
44 TokenPosition type_pos, 47 TokenPosition type_pos,
45 const char* format, 48 const char* format,
46 ...) PRINTF_ATTRIBUTE(4, 5); 49 ...) PRINTF_ATTRIBUTE(4, 5);
47 50
(...skipping 97 matching lines...) Expand 10 before | Expand all | Expand 10 after
145 const AbstractType& type, 148 const AbstractType& type,
146 PendingTypes* pending_types); 149 PendingTypes* pending_types);
147 static void CheckTypeBounds(const Class& cls, const AbstractType& type); 150 static void CheckTypeBounds(const Class& cls, const AbstractType& type);
148 static void CheckTypeArgumentBounds(const Class& cls, 151 static void CheckTypeArgumentBounds(const Class& cls,
149 const TypeArguments& arguments, 152 const TypeArguments& arguments,
150 Error* bound_error); 153 Error* bound_error);
151 static void ResolveUpperBounds(const Class& cls); 154 static void ResolveUpperBounds(const Class& cls);
152 static void FinalizeUpperBounds(const Class& cls, 155 static void FinalizeUpperBounds(const Class& cls,
153 FinalizationKind finalization); 156 FinalizationKind finalization);
154 static void ResolveSignature(const Class& cls, const Function& function); 157 static void ResolveSignature(const Class& cls, const Function& function);
155 static void FinalizeSignature(const Class& cls, const Function& function);
156 static void ResolveAndFinalizeMemberTypes(const Class& cls); 158 static void ResolveAndFinalizeMemberTypes(const Class& cls);
157 static void PrintClassInformation(const Class& cls); 159 static void PrintClassInformation(const Class& cls);
158 static void CollectInterfaces(const Class& cls, 160 static void CollectInterfaces(const Class& cls,
159 GrowableArray<const Class*>* collected); 161 GrowableArray<const Class*>* collected);
160 162
161 static void MarkTypeMalformed(const Error& prev_error, 163 static void MarkTypeMalformed(const Error& prev_error,
162 const Script& script, 164 const Script& script,
163 const Type& type, 165 const Type& type,
164 const char* format, 166 const char* format,
165 va_list args); 167 va_list args);
166 static void ReportError(const Error& error); 168 static void ReportError(const Error& error);
167 static void ReportError(const Class& cls, 169 static void ReportError(const Class& cls,
168 TokenPosition token_pos, 170 TokenPosition token_pos,
169 const char* format, 171 const char* format,
170 ...) PRINTF_ATTRIBUTE(3, 4); 172 ...) PRINTF_ATTRIBUTE(3, 4);
171 static void ReportErrors(const Error& prev_error, 173 static void ReportErrors(const Error& prev_error,
172 const Class& cls, 174 const Class& cls,
173 TokenPosition token_pos, 175 TokenPosition token_pos,
174 const char* format, 176 const char* format,
175 ...) PRINTF_ATTRIBUTE(4, 5); 177 ...) PRINTF_ATTRIBUTE(4, 5);
176 178
177 // Verify implicit offsets recorded in the VM for direct access to fields of 179 // Verify implicit offsets recorded in the VM for direct access to fields of
178 // Dart instances (e.g: _TypedListView, _ByteDataView). 180 // Dart instances (e.g: _TypedListView, _ByteDataView).
179 static void VerifyImplicitFieldOffsets(); 181 static void VerifyImplicitFieldOffsets();
180 }; 182 };
181 183
182 } // namespace dart 184 } // namespace dart
183 185
184 #endif // RUNTIME_VM_CLASS_FINALIZER_H_ 186 #endif // RUNTIME_VM_CLASS_FINALIZER_H_
OLDNEW
« no previous file with comments | « no previous file | runtime/vm/class_finalizer.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698