OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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 #include <stdlib.h> | 5 #include <stdlib.h> |
6 #include <string.h> | 6 #include <string.h> |
7 #include <stdio.h> | 7 #include <stdio.h> |
8 | 8 |
9 #include "include/dart_api.h" | 9 #include "include/dart_api.h" |
10 #include "include/dart_tools_api.h" | 10 #include "include/dart_tools_api.h" |
(...skipping 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1197 char** isolate_snapshot_fname) { | 1197 char** isolate_snapshot_fname) { |
1198 intptr_t len = snprintf(NULL, 0, "%s.%s", filename, kVMIsolateSuffix); | 1198 intptr_t len = snprintf(NULL, 0, "%s.%s", filename, kVMIsolateSuffix); |
1199 *vm_snapshot_fname = new char[len + 1]; | 1199 *vm_snapshot_fname = new char[len + 1]; |
1200 snprintf(*vm_snapshot_fname, len + 1, "%s.%s", filename, kVMIsolateSuffix); | 1200 snprintf(*vm_snapshot_fname, len + 1, "%s.%s", filename, kVMIsolateSuffix); |
1201 | 1201 |
1202 len = snprintf(NULL, 0, "%s.%s", filename, kIsolateSuffix); | 1202 len = snprintf(NULL, 0, "%s.%s", filename, kIsolateSuffix); |
1203 *isolate_snapshot_fname = new char[len + 1]; | 1203 *isolate_snapshot_fname = new char[len + 1]; |
1204 snprintf(*isolate_snapshot_fname, len + 1, "%s.%s", filename, kIsolateSuffix); | 1204 snprintf(*isolate_snapshot_fname, len + 1, "%s.%s", filename, kIsolateSuffix); |
1205 } | 1205 } |
1206 | 1206 |
| 1207 |
1207 static void GenerateFullSnapshot() { | 1208 static void GenerateFullSnapshot() { |
1208 // Create a full snapshot of the script. | 1209 // Create a full snapshot of the script. |
1209 Dart_Handle result; | 1210 Dart_Handle result; |
1210 uint8_t* vm_isolate_buffer = NULL; | 1211 uint8_t* vm_isolate_buffer = NULL; |
1211 intptr_t vm_isolate_size = 0; | 1212 intptr_t vm_isolate_size = 0; |
1212 uint8_t* isolate_buffer = NULL; | 1213 uint8_t* isolate_buffer = NULL; |
1213 intptr_t isolate_size = 0; | 1214 intptr_t isolate_size = 0; |
1214 char* vm_snapshot_fname = NULL; | 1215 char* vm_snapshot_fname = NULL; |
1215 char* isolate_snapshot_fname = NULL; | 1216 char* isolate_snapshot_fname = NULL; |
1216 | 1217 |
(...skipping 487 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1704 Platform::Exit(Process::GlobalExitCode()); | 1705 Platform::Exit(Process::GlobalExitCode()); |
1705 } | 1706 } |
1706 | 1707 |
1707 } // namespace bin | 1708 } // namespace bin |
1708 } // namespace dart | 1709 } // namespace dart |
1709 | 1710 |
1710 int main(int argc, char** argv) { | 1711 int main(int argc, char** argv) { |
1711 dart::bin::main(argc, argv); | 1712 dart::bin::main(argc, argv); |
1712 UNREACHABLE(); | 1713 UNREACHABLE(); |
1713 } | 1714 } |
OLD | NEW |