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

Side by Side Diff: runtime/bin/gen_snapshot.cc

Issue 2405393002: Use a single file for app snapshots. (Closed)
Patch Set: okay 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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 // Generate a snapshot file after loading all the scripts specified on the 5 // Generate a snapshot file after loading all the scripts specified on the
6 // command line. 6 // command line.
7 7
8 #include <stdio.h> 8 #include <stdio.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <string.h> 10 #include <string.h>
(...skipping 1036 matching lines...) Expand 10 before | Expand all | Expand 10 after
1047 uint8_t* rodata_blob_buffer = NULL; 1047 uint8_t* rodata_blob_buffer = NULL;
1048 intptr_t rodata_blob_size = 0; 1048 intptr_t rodata_blob_size = 0;
1049 1049
1050 // Precompile with specified embedder entry points 1050 // Precompile with specified embedder entry points
1051 result = Dart_Precompile(standalone_entry_points, true); 1051 result = Dart_Precompile(standalone_entry_points, true);
1052 CHECK_RESULT(result); 1052 CHECK_RESULT(result);
1053 1053
1054 // Create a precompiled snapshot. 1054 // Create a precompiled snapshot.
1055 bool as_assembly = assembly_filename != NULL; 1055 bool as_assembly = assembly_filename != NULL;
1056 if (as_assembly) { 1056 if (as_assembly) {
1057 result = Dart_CreatePrecompiledSnapshotAssembly(&vm_isolate_buffer, 1057 result = Dart_CreatePrecompiledSnapshotAssembly(&assembly_buffer,
1058 &vm_isolate_size,
1059 &isolate_buffer,
1060 &isolate_size,
1061 &assembly_buffer,
1062 &assembly_size); 1058 &assembly_size);
1063 CHECK_RESULT(result); 1059 CHECK_RESULT(result);
1064 } else { 1060 } else {
1065 result = Dart_CreatePrecompiledSnapshotBlob(&vm_isolate_buffer, 1061 result = Dart_CreatePrecompiledSnapshotBlob(&vm_isolate_buffer,
1066 &vm_isolate_size, 1062 &vm_isolate_size,
1067 &isolate_buffer, 1063 &isolate_buffer,
1068 &isolate_size, 1064 &isolate_size,
1069 &instructions_blob_buffer, 1065 &instructions_blob_buffer,
1070 &instructions_blob_size, 1066 &instructions_blob_size,
1071 &rodata_blob_buffer, 1067 &rodata_blob_buffer,
(...skipping 282 matching lines...) Expand 10 before | Expand all | Expand 10 after
1354 EventHandler::Stop(); 1350 EventHandler::Stop();
1355 return 0; 1351 return 0;
1356 } 1352 }
1357 1353
1358 } // namespace bin 1354 } // namespace bin
1359 } // namespace dart 1355 } // namespace dart
1360 1356
1361 int main(int argc, char** argv) { 1357 int main(int argc, char** argv) {
1362 return dart::bin::main(argc, argv); 1358 return dart::bin::main(argc, argv);
1363 } 1359 }
OLDNEW
« runtime/bin/file_win.cc ('K') | « runtime/bin/file_win.cc ('k') | runtime/bin/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698