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

Unified Diff: runtime/vm/class_finalizer.cc

Issue 10828399: Implement class hierarchy analysis in the VM. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 4 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/class_table.h » ('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 11005)
+++ runtime/vm/class_finalizer.cc (working copy)
@@ -1122,6 +1122,9 @@
name.ToCString());
}
cls.Finalize();
+ // Signature classes extend Object. No need to add this class to the direct
+ // subclasses of Object.
+ ASSERT(super_type.IsNull() || super_type.IsObjectType());
return;
}
// Finalize factory class, if any.
@@ -1168,6 +1171,12 @@
cls_name.ToCString(), lib_name.ToCString());
}
}
+ // Add this class to the direct subclasses of the superclass, unless the
+ // superclass is Object.
+ if (!super_type.IsNull() && !super_type.IsObjectType()) {
+ ASSERT(!super_class.IsNull());
+ super_class.AddDirectSubclass(cls);
+ }
}
« no previous file with comments | « no previous file | runtime/vm/class_table.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698