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

Unified Diff: runtime/vm/precompiler.cc

Issue 1955453002: - Use a map to lookup libraries by URL. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Fix precompiler handling. 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
Index: runtime/vm/precompiler.cc
diff --git a/runtime/vm/precompiler.cc b/runtime/vm/precompiler.cc
index 0bb66695f31193e5d1a3aa19f8339f1f2eaf3d4c..f4ab8efe521929d04fe5f1f543dbed0855619a87 100644
--- a/runtime/vm/precompiler.cc
+++ b/runtime/vm/precompiler.cc
@@ -354,7 +354,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));
@@ -1638,7 +1638,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++) {
@@ -1668,7 +1669,7 @@ void Precompiler::DropLibraries() {
}
}
- I->object_store()->set_libraries(retained_libraries);
+ Library::RegisterLibraries(T, retained_libraries);
libraries_ = retained_libraries.raw();
}

Powered by Google App Engine
This is Rietveld 408576698