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

Unified Diff: runtime/vm/bootstrap.cc

Issue 2786083002: Read platform.dill in the VM. (Closed)
Patch Set: Allow main to be a field or getter. Created 3 years, 9 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/bootstrap.cc
diff --git a/runtime/vm/bootstrap.cc b/runtime/vm/bootstrap.cc
index d90c7321eea087b51d8585725490b0e5b4118f63..dd3e75a6407be79514daa959e5ad5ff9401258e1 100644
--- a/runtime/vm/bootstrap.cc
+++ b/runtime/vm/bootstrap.cc
@@ -356,6 +356,7 @@ static 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);
String& kernel_name = String::Handle(zone);
@@ -375,7 +376,18 @@ static 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();
}
#else

Powered by Google App Engine
This is Rietveld 408576698