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

Unified Diff: runtime/vm/dart_api_impl.cc

Issue 2583673002: When creating a JIT app snapshot, don't recreate the VM isolate snapshot. (Closed)
Patch Set: Created 4 years 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/dart_api_impl.cc
diff --git a/runtime/vm/dart_api_impl.cc b/runtime/vm/dart_api_impl.cc
index 61daa777f0707c8bb892261a75b4ce4fd34818c1..dc01549f0b21bd75bb2b4c7810412689350f2417 100644
--- a/runtime/vm/dart_api_impl.cc
+++ b/runtime/vm/dart_api_impl.cc
@@ -6632,9 +6632,7 @@ DART_EXPORT Dart_Handle Dart_PrecompileJIT() {
DART_EXPORT Dart_Handle
-Dart_CreateAppJITSnapshot(uint8_t** vm_isolate_snapshot_buffer,
- intptr_t* vm_isolate_snapshot_size,
- uint8_t** isolate_snapshot_buffer,
+Dart_CreateAppJITSnapshot(uint8_t** isolate_snapshot_buffer,
intptr_t* isolate_snapshot_size,
uint8_t** instructions_blob_buffer,
intptr_t* instructions_blob_size,
@@ -6652,12 +6650,6 @@ Dart_CreateAppJITSnapshot(uint8_t** vm_isolate_snapshot_buffer,
return Api::NewError(
"Creating full snapshots requires --load_deferred_eagerly");
}
- if (vm_isolate_snapshot_buffer == NULL) {
- RETURN_NULL_ERROR(vm_isolate_snapshot_buffer);
- }
- if (vm_isolate_snapshot_size == NULL) {
- RETURN_NULL_ERROR(vm_isolate_snapshot_size);
- }
if (isolate_snapshot_buffer == NULL) {
RETURN_NULL_ERROR(isolate_snapshot_buffer);
}
@@ -6688,11 +6680,9 @@ Dart_CreateAppJITSnapshot(uint8_t** vm_isolate_snapshot_buffer,
BlobInstructionsWriter instructions_writer(instructions_blob_buffer,
rodata_blob_buffer, ApiReallocate,
2 * MB /* initial_size */);
- FullSnapshotWriter writer(Snapshot::kAppJIT, vm_isolate_snapshot_buffer,
- isolate_snapshot_buffer, ApiReallocate,
- &instructions_writer);
+ FullSnapshotWriter writer(Snapshot::kAppJIT, NULL, isolate_snapshot_buffer,
+ ApiReallocate, &instructions_writer);
writer.WriteFullSnapshot();
- *vm_isolate_snapshot_size = writer.VmIsolateSnapshotSize();
*isolate_snapshot_size = writer.IsolateSnapshotSize();
*instructions_blob_size = instructions_writer.InstructionsBlobSize();
*rodata_blob_size = instructions_writer.RodataBlobSize();
« no previous file with comments | « runtime/vm/dart.cc ('k') | runtime/vm/pages.cc » ('j') | runtime/vm/stub_code.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698