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

Unified Diff: runtime/vm/snapshot.cc

Issue 2405393002: Use a single file for app snapshots. (Closed)
Patch Set: gen_snapshot Created 4 years, 2 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/snapshot.h ('k') | tools/testing/dart/compiler_configuration.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/snapshot.cc
diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc
index 0062dacd54416bf28618fe500a12d7036128c274..08cf77ce3a9a7299cf79ad77175343a800e8f584 100644
--- a/runtime/vm/snapshot.cc
+++ b/runtime/vm/snapshot.cc
@@ -704,7 +704,10 @@ static void EnsureIdentifier(char* label) {
}
-void AssemblyInstructionsWriter::Write() {
+void AssemblyInstructionsWriter::Write(uint8_t* vmisolate_buffer,
+ intptr_t vmisolate_length,
+ uint8_t* isolate_buffer,
+ intptr_t isolate_length) {
Thread* thread = Thread::Current();
Zone* zone = thread->zone();
NOT_IN_PRODUCT(TimelineDurationScope tds(thread,
@@ -849,10 +852,28 @@ void AssemblyInstructionsWriter::Write() {
WriteWordLiteralData(*cursor);
}
}
+
+
+ assembly_stream_.Print(".globl _kVmIsolateSnapshot\n");
+ assembly_stream_.Print(".balign %" Pd ", 0\n", VirtualMemory::PageSize());
+ assembly_stream_.Print("_kVmIsolateSnapshot:\n");
+ for (intptr_t i = 0; i < vmisolate_length; i++) {
+ assembly_stream_.Print(".byte %" Pd "\n", vmisolate_buffer[i]);
+ }
+
+ assembly_stream_.Print(".globl _kIsolateSnapshot\n");
+ assembly_stream_.Print(".balign %" Pd ", 0\n", VirtualMemory::PageSize());
+ assembly_stream_.Print("_kIsolateSnapshot:\n");
+ for (intptr_t i = 0; i < isolate_length; i++) {
+ assembly_stream_.Print(".byte %" Pd "\n", isolate_buffer[i]);
+ }
}
-void BlobInstructionsWriter::Write() {
+void BlobInstructionsWriter::Write(uint8_t* vmisolate_buffer,
+ intptr_t vmisolate_len,
+ uint8_t* isolate_buffer,
+ intptr_t isolate_length) {
Thread* thread = Thread::Current();
Zone* zone = thread->zone();
NOT_IN_PRODUCT(TimelineDurationScope tds(thread,
« no previous file with comments | « runtime/vm/snapshot.h ('k') | tools/testing/dart/compiler_configuration.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698