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

Unified Diff: runtime/vm/class_finalizer.cc

Issue 10050034: Do not require type class to be finalized when performing a type test. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/class_finalizer.cc
===================================================================
--- runtime/vm/class_finalizer.cc (revision 6439)
+++ runtime/vm/class_finalizer.cc (working copy)
@@ -511,6 +511,9 @@
FinalizationKind finalization) {
ASSERT(arguments.Length() >= cls.NumTypeArguments());
if (!cls.is_finalized()) {
+ const GrowableObjectArray& visited =
+ GrowableObjectArray::Handle(GrowableObjectArray::New());
+ ResolveInterfaces(cls, visited);
FinalizeTypeParameters(cls);
}
Type& super_type = Type::Handle(cls.super_type());
@@ -604,10 +607,14 @@
// The type class does not need to be finalized in order to finalize the type,
// however, it must at least be resolved (this was done as part of resolving
- // the type itself, a precondition to calling FinalizeType) and the upper
- // bounds of its type parameters must be finalized (done here).
+ // the type itself, a precondition to calling FinalizeType).
+ // Also, the interfaces of the type class must be resolved and the type
+ // parameters of the type class must be finalized.
Class& type_class = Class::Handle(parameterized_type.type_class());
if (!type_class.is_finalized()) {
+ const GrowableObjectArray& visited =
+ GrowableObjectArray::Handle(GrowableObjectArray::New());
+ ResolveInterfaces(type_class, visited);
FinalizeTypeParameters(type_class);
}
« no previous file with comments | « no previous file | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698