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

Unified Diff: runtime/vm/precompiler.cc

Issue 1947393003: - Use a map to lookup libraries by URL. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/precompiler.cc
diff --git a/runtime/vm/precompiler.cc b/runtime/vm/precompiler.cc
index 69bbaba87e9e256e5de69fd20d9c5681addfdb77..fe8584e6d3a2f21c9f6e4f30ddb438ed56904d0f 100644
--- a/runtime/vm/precompiler.cc
+++ b/runtime/vm/precompiler.cc
@@ -355,7 +355,7 @@ void Precompiler::AddEntryPoints(Dart_QualifiedFunctionName entry_points[]) {
class_name = Symbols::New(thread(), entry_points[i].class_name);
function_name = Symbols::New(thread(), entry_points[i].function_name);
- lib = Library::LookupLibrary(library_uri);
+ lib = Library::LookupLibrary(T, library_uri);
if (lib.IsNull()) {
String& msg = String::Handle(Z, String::NewFormatted(
"Cannot find entry point %s\n", entry_points[i].library_uri));
@@ -1639,7 +1639,8 @@ void Precompiler::DropClasses() {
void Precompiler::DropLibraries() {
const GrowableObjectArray& retained_libraries =
GrowableObjectArray::Handle(Z, GrowableObjectArray::New());
- Library& root_lib = Library::Handle(Z, I->object_store()->root_library());
+ const Library& root_lib = Library::Handle(Z,
+ I->object_store()->root_library());
Library& lib = Library::Handle(Z);
for (intptr_t i = 0; i < libraries_.Length(); i++) {
@@ -1669,7 +1670,7 @@ void Precompiler::DropLibraries() {
}
}
- I->object_store()->set_libraries(retained_libraries);
+ Library::RegisterLibraries(T, retained_libraries);
libraries_ = retained_libraries.raw();
}
« no previous file with comments | « runtime/vm/parser.cc ('k') | runtime/vm/raw_object_snapshot.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698