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

Unified Diff: runtime/bin/dfe.cc

Issue 2925203002: Load service isolate from the kernel binary. (Closed)
Patch Set: Rebase Created 3 years, 6 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/bin/dfe.h ('k') | runtime/bin/main.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/dfe.cc
diff --git a/runtime/bin/dfe.cc b/runtime/bin/dfe.cc
index 9b37e98cb722d802bcb2f270a42cfebc677cf90e..8ad055df505d6864cb81ce3427fa97dfa3d14c3d 100644
--- a/runtime/bin/dfe.cc
+++ b/runtime/bin/dfe.cc
@@ -13,12 +13,15 @@ namespace dart {
namespace bin {
const char kPlatformBinaryName[] = "platform.dill";
+const char kVMServiceIOBinaryName[] = "vmservice_io.dill";
DFE::DFE()
: frontend_filename_(NULL),
platform_binary_filename_(NULL),
- kernel_platform_(NULL) {}
+ vmservice_io_binary_filename_(NULL),
+ kernel_platform_(NULL),
+ kernel_vmservice_io_(NULL) {}
DFE::~DFE() {
@@ -33,6 +36,11 @@ DFE::~DFE() {
delete reinterpret_cast<kernel::Program*>(kernel_platform_);
kernel_platform_ = NULL;
}
+
+ if (kernel_vmservice_io_ != NULL) {
+ delete reinterpret_cast<kernel::Program*>(kernel_vmservice_io_);
+ kernel_vmservice_io_ = NULL;
+ }
}
@@ -43,6 +51,13 @@ void DFE::SetKernelBinaries(const char* name) {
platform_binary_filename_ = new char[len];
snprintf(platform_binary_filename_, len, "%s%s%s", name,
File::PathSeparator(), kPlatformBinaryName);
+
+ len = snprintf(NULL, 0, "%s%s%s", name, File::PathSeparator(),
+ kVMServiceIOBinaryName) +
+ 1;
+ vmservice_io_binary_filename_ = new char[len];
+ snprintf(vmservice_io_binary_filename_, len, "%s%s%s", name,
+ File::PathSeparator(), kVMServiceIOBinaryName);
}
@@ -109,6 +124,11 @@ void* DFE::ReadPlatform() {
}
+void* DFE::ReadVMServiceIO() {
+ return kernel_vmservice_io_ = ReadScript(vmservice_io_binary_filename_);
+}
+
+
void* DFE::ReadScript(const char* script_uri) {
const uint8_t* buffer = NULL;
intptr_t buffer_length = -1;
« no previous file with comments | « runtime/bin/dfe.h ('k') | runtime/bin/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698