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

Unified Diff: runtime/vm/class_finalizer.cc

Issue 11088079: Resolve interfaces before starting finalizing classes (issue 5586). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 2 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 | no next file » | 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 13559)
+++ runtime/vm/class_finalizer.cc (working copy)
@@ -57,12 +57,14 @@
for (intptr_t i = 0; i < class_array.Length(); i++) {
cls ^= class_array.At(i);
if (FLAG_trace_class_finalization) {
- OS::Print("Resolving super and default: %s\n", cls.ToCString());
+ OS::Print("Resolving super and interfaces: %s\n", cls.ToCString());
}
ResolveSuperType(cls);
if (cls.is_interface()) {
ResolveFactoryClass(cls);
}
+ GrowableArray<intptr_t> visited_interfaces;
+ ResolveInterfaces(cls, &visited_interfaces);
}
// Finalize all classes.
for (intptr_t i = 0; i < class_array.Length(); i++) {
@@ -621,8 +623,6 @@
FinalizationKind finalization) {
ASSERT(arguments.Length() >= cls.NumTypeArguments());
if (!cls.is_finalized()) {
- GrowableArray<intptr_t> visited_interfaces;
- ResolveInterfaces(cls, &visited_interfaces);
FinalizeTypeParameters(cls);
}
Type& super_type = Type::Handle(cls.super_type());
@@ -730,8 +730,6 @@
// parameters of the type class must be finalized.
Class& type_class = Class::Handle(parameterized_type.type_class());
if (!type_class.is_finalized()) {
- GrowableArray<intptr_t> visited_interfaces;
- ResolveInterfaces(type_class, &visited_interfaces);
FinalizeTypeParameters(type_class);
}
@@ -1186,8 +1184,6 @@
"class '%s' has a cycle in its superclass relationship",
name.ToCString());
}
- GrowableArray<intptr_t> visited_interfaces;
- ResolveInterfaces(cls, &visited_interfaces);
// Finalize super class.
const Class& super_class = Class::Handle(cls.SuperClass());
if (!super_class.IsNull()) {
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698