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

Unified Diff: runtime/vm/bootstrap_nocore.cc

Issue 2786083002: Read platform.dill in the VM. (Closed)
Patch Set: Incorporate review comments and merge. Created 3 years, 8 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/bootstrap.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/bootstrap_nocore.cc
diff --git a/runtime/vm/bootstrap_nocore.cc b/runtime/vm/bootstrap_nocore.cc
index b3d7484eab39b8c32dadaf129f2b956551b96c22..44cff902480f0956bebf9f6a0cdeee44af1bbaef 100644
--- a/runtime/vm/bootstrap_nocore.cc
+++ b/runtime/vm/bootstrap_nocore.cc
@@ -86,6 +86,7 @@ RawError* BootstrapFromKernel(Thread* thread, kernel::Program* program) {
pending.set_is_marked_for_parsing();
}
+ // Load the bootstrap libraries in order (see object_store.h).
Library& library = Library::Handle(zone);
String& dart_name = String::Handle(zone);
for (intptr_t i = 0; i < bootstrap_library_count; ++i) {
@@ -104,7 +105,18 @@ RawError* BootstrapFromKernel(Thread* thread, kernel::Program* program) {
}
}
+ // Finish bootstrapping, including class finalization.
Finish(thread, /*from_kernel=*/true);
+
+ // The platform binary may contain other libraries (e.g., dart:_builtin or
+ // dart:io) that will not be bundled with application. Load them now.
+ reader.ReadProgram();
+
+ // The builtin library should be registered with the VM.
+ dart_name = String::New("dart:_builtin");
+ library = Library::LookupLibrary(thread, dart_name);
+ isolate->object_store()->set_builtin_library(library);
+
return Error::null();
}
« no previous file with comments | « runtime/vm/bootstrap.cc ('k') | runtime/vm/dart_api_impl.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698