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

Unified Diff: runtime/bin/dartutils.cc

Issue 1915853004: Option to output precompiled instructions as a blob for use with mmap instead of assembly for use i… (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 4 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/bin/dartutils.h ('k') | runtime/bin/file.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/bin/dartutils.cc
diff --git a/runtime/bin/dartutils.cc b/runtime/bin/dartutils.cc
index 396b116fdd6d6dadb4b3fff83cba50a42d8796e2..e180479bccbdf498047d151f1e11bbde78345d7f 100644
--- a/runtime/bin/dartutils.cc
+++ b/runtime/bin/dartutils.cc
@@ -180,6 +180,17 @@ bool DartUtils::IsDartBuiltinLibURL(const char* url_name) {
}
+void* DartUtils::MapExecutable(const char* name, intptr_t* len) {
+ File* file = File::Open(name, File::kRead);
+ if (file == NULL) {
+ return NULL;
+ }
+ void* addr = file->MapExecutable(len);
+ file->Release();
+ return addr;
+}
+
+
void* DartUtils::OpenFile(const char* name, bool write) {
File* file = File::Open(name, write ? File::kWriteTruncate : File::kRead);
return reinterpret_cast<void*>(file);
« no previous file with comments | « runtime/bin/dartutils.h ('k') | runtime/bin/file.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698