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

Unified Diff: runtime/vm/class_finalizer.cc

Issue 11348283: Add flag 'implements' to class, it is set anytime someone implements this class. This is a way to r… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 1 month 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.h » ('j') | runtime/vm/object.cc » ('J')
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/class_finalizer.cc
===================================================================
--- runtime/vm/class_finalizer.cc (revision 15471)
+++ runtime/vm/class_finalizer.cc (working copy)
@@ -104,6 +104,22 @@
}
+static void MarkImplementedClasses(const GrowableObjectArray& class_array) {
+ Class& cls = Class::Handle();
+ Array& interfaces_array = Array::Handle();
+ Type& type = Type::Handle();
+ for (intptr_t i = 0; i < class_array.Length(); i++) {
+ cls ^= class_array.At(i);
+ interfaces_array = cls.interfaces();
+ for (intptr_t k = 0; k < interfaces_array.Length(); k++) {
+ type ^= interfaces_array.At(k);
+ cls = type.type_class();
+ cls.set_is_implemented();
+ }
+ }
+}
+
+
// Class finalization occurs:
// a) when bootstrap process completes (VerifyBootstrapClasses).
// b) after the user classes are loaded (dart_api).
@@ -156,6 +172,7 @@
PrintClassInformation(cls);
}
}
+ MarkImplementedClasses(class_array);
regis 2012/11/28 22:32:17 Instead of adding another pass, you could mark int
srdjan 2012/11/28 22:43:50 Done.
// Clear pending classes array.
class_array = GrowableObjectArray::New();
object_store->set_pending_classes(class_array);
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | runtime/vm/object.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698