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

Unified Diff: runtime/vm/isolate.cc

Issue 10414084: Replace linked list of loaded libraries (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 8 years, 7 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
Index: runtime/vm/isolate.cc
===================================================================
--- runtime/vm/isolate.cc (revision 7914)
+++ runtime/vm/isolate.cc (working copy)
@@ -324,10 +324,12 @@
ASSERT(this == Isolate::Current());
Zone zone(this);
HandleScope handle_scope(this);
+ const GrowableObjectArray& libraries =
+ GrowableObjectArray::Handle(object_store()->libraries());
Library& library = Library::Handle();
- library = object_store()->registered_libraries();
GrowableArray<const Function*> invoked_functions;
- while (!library.IsNull()) {
+ for (int i = 0; i < libraries.Length(); i++) {
+ library ^= libraries.At(i);
Class& cls = Class::Handle();
ClassDictionaryIterator iter(library);
while (iter.HasNext()) {
@@ -339,7 +341,6 @@
cls ^= anon_classes.At(i);
AddFunctionsFromClass(cls, &invoked_functions);
}
- library = library.next_registered();
}
invoked_functions.Sort(MostUsedFunctionFirst);
for (int i = 0; i < invoked_functions.length(); i++) {

Powered by Google App Engine
This is Rietveld 408576698