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

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

Issue 8872037: Adjust index of type parameters at finalization time (fix issue 718). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 9 years 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 | Annotate | Revision Log
OLDNEW
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
(...skipping 23 matching lines...) Expand all
34 // Add 'interface' to 'interface_list' if it is not already in the list and 34 // Add 'interface' to 'interface_list' if it is not already in the list and
35 // return true. Also return true if 'interface' is not added, because it is 35 // return true. Also return true if 'interface' is not added, because it is
36 // not unique, i.e. it is already in the list. 36 // not unique, i.e. it is already in the list.
37 // Return false if 'interface' conflicts with an interface already in the list 37 // Return false if 'interface' conflicts with an interface already in the list
38 // with the same class, but different type arguments. 38 // with the same class, but different type arguments.
39 // In the case of a conflict, set 'conflicting' to the existing interface. 39 // In the case of a conflict, set 'conflicting' to the existing interface.
40 static bool AddInterfaceIfUnique(GrowableArray<AbstractType*>* interface_list, 40 static bool AddInterfaceIfUnique(GrowableArray<AbstractType*>* interface_list,
41 AbstractType* interface, 41 AbstractType* interface,
42 AbstractType* conflicting); 42 AbstractType* conflicting);
43 43
44 // Finalize and canonicalize type while parsing. 44 // Finalize and canonicalize type while parsing class cls.
45 // Set the error message on failure (to String::null() if no error). 45 // Set the error message on failure (to String::null() if no error).
46 static RawType* FinalizeAndCanonicalizeType(const Type& type, String* errmsg); 46 static RawAbstractType* FinalizeAndCanonicalizeType(const Class& cls,
47 const AbstractType& type,
srdjan 2011/12/08 22:30:29 Maybe it would make sense to have 'type' as first
regis 2011/12/08 22:50:20 Not unless we also change ResolveClass, ResolveTyp
48 String* errmsg);
47 49
48 // Pending classes are classes that need to be finalized. 50 // Pending classes are classes that need to be finalized.
49 static void AddPendingClasses(const GrowableArray<const Class*>& classes); 51 static void AddPendingClasses(const GrowableArray<const Class*>& classes);
50 52
51 // Return false if we still have classes pending to be finalized. 53 // Return false if we still have classes pending to be finalized.
52 static bool AllClassesFinalized(); 54 static bool AllClassesFinalized();
53 55
54 // Return whether class finalization failed. 56 // Return whether class finalization failed.
55 // The function returns true if the finalization was successful. 57 // The function returns true if the finalization was successful.
56 // If finalization fails, an error message is set in the sticky error field 58 // If finalization fails, an error message is set in the sticky error field
(...skipping 16 matching lines...) Expand all
73 static void CheckForLegalConstClass(const Class& cls); 75 static void CheckForLegalConstClass(const Class& cls);
74 static RawClass* ResolveClass(const Class& cls, 76 static RawClass* ResolveClass(const Class& cls,
75 const UnresolvedClass& unresolved_class); 77 const UnresolvedClass& unresolved_class);
76 static void ResolveSuperType(const Class& cls); 78 static void ResolveSuperType(const Class& cls);
77 static void ResolveFactoryClass(const Class& cls); 79 static void ResolveFactoryClass(const Class& cls);
78 static void ResolveInterfaces(const Class& cls, 80 static void ResolveInterfaces(const Class& cls,
79 GrowableArray<const Class*>* visited); 81 GrowableArray<const Class*>* visited);
80 static void FinalizeTypeArguments(const Class& cls, 82 static void FinalizeTypeArguments(const Class& cls,
81 const AbstractTypeArguments& arguments); 83 const AbstractTypeArguments& arguments);
82 static void ResolveType(const Class& cls, const AbstractType& type); 84 static void ResolveType(const Class& cls, const AbstractType& type);
83 static RawAbstractType* FinalizeType(const AbstractType& type); 85 static RawAbstractType* FinalizeType(const Class& cls,
86 const AbstractType& type);
srdjan 2011/12/08 22:30:29 ditto
regis 2011/12/08 22:50:20 ditto
84 static void ResolveAndFinalizeUpperBounds(const Class& cls); 87 static void ResolveAndFinalizeUpperBounds(const Class& cls);
85 static void VerifyUpperBounds(const Class& cls, 88 static void VerifyUpperBounds(const Class& cls,
86 const AbstractTypeArguments& arguments); 89 const AbstractTypeArguments& arguments);
87 static void ResolveAndFinalizeSignature(const Class& cls, 90 static void ResolveAndFinalizeSignature(const Class& cls,
88 const Function& function); 91 const Function& function);
89 static void ResolveAndFinalizeMemberTypes(const Class& cls); 92 static void ResolveAndFinalizeMemberTypes(const Class& cls);
90 static void PrintClassInformation(const Class& cls); 93 static void PrintClassInformation(const Class& cls);
91 static void VerifyClassImplements(const Class& cls); 94 static void VerifyClassImplements(const Class& cls);
92 static void CollectInterfaces(const Class& cls, 95 static void CollectInterfaces(const Class& cls,
93 GrowableArray<const Class*>* interfaces); 96 GrowableArray<const Class*>* interfaces);
94 static void ReportError(const Script& script, 97 static void ReportError(const Script& script,
95 intptr_t token_index, 98 intptr_t token_index,
96 const char* format, ...); 99 const char* format, ...);
97 static void ReportError(const char* format, ...); 100 static void ReportError(const char* format, ...);
98 static void ReportWarning(const Script& script, 101 static void ReportWarning(const Script& script,
99 intptr_t token_index, 102 intptr_t token_index,
100 const char* format, ...); 103 const char* format, ...);
101 }; 104 };
102 105
103 } // namespace dart 106 } // namespace dart
104 107
105 #endif // VM_CLASS_FINALIZER_H_ 108 #endif // VM_CLASS_FINALIZER_H_
OLDNEW
« no previous file with comments | « runtime/lib/error.cc ('k') | runtime/vm/class_finalizer.cc » ('j') | runtime/vm/raw_object.h » ('J')

Powered by Google App Engine
This is Rietveld 408576698