| OLD | NEW |
| 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 1188 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1199 TimerUtils::InitOnce(); | 1199 TimerUtils::InitOnce(); |
| 1200 EventHandler::Start(); | 1200 EventHandler::Start(); |
| 1201 | 1201 |
| 1202 #if !defined(PRODUCT) | 1202 #if !defined(PRODUCT) |
| 1203 // Constant true in PRODUCT mode. | 1203 // Constant true in PRODUCT mode. |
| 1204 vm_options.AddArgument("--load_deferred_eagerly"); | 1204 vm_options.AddArgument("--load_deferred_eagerly"); |
| 1205 #endif | 1205 #endif |
| 1206 | 1206 |
| 1207 if (IsSnapshottingForPrecompilation()) { | 1207 if (IsSnapshottingForPrecompilation()) { |
| 1208 vm_options.AddArgument("--precompilation"); | 1208 vm_options.AddArgument("--precompilation"); |
| 1209 #if !defined(PRODUCT) |
| 1209 vm_options.AddArgument("--print_snapshot_sizes"); | 1210 vm_options.AddArgument("--print_snapshot_sizes"); |
| 1211 #endif |
| 1210 #if TARGET_ARCH_ARM | 1212 #if TARGET_ARCH_ARM |
| 1211 // This is for the iPod Touch 5th Generation (and maybe other older devices) | 1213 // This is for the iPod Touch 5th Generation (and maybe other older devices) |
| 1212 vm_options.AddArgument("--no-use_integer_division"); | 1214 vm_options.AddArgument("--no-use_integer_division"); |
| 1213 #endif | 1215 #endif |
| 1214 } | 1216 } |
| 1215 | 1217 |
| 1216 Dart_SetVMFlags(vm_options.count(), vm_options.arguments()); | 1218 Dart_SetVMFlags(vm_options.count(), vm_options.arguments()); |
| 1217 | 1219 |
| 1218 // Initialize the Dart VM. | 1220 // Initialize the Dart VM. |
| 1219 // Note: We don't expect isolates to be created from dart code during | 1221 // Note: We don't expect isolates to be created from dart code during |
| (...skipping 145 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1365 EventHandler::Stop(); | 1367 EventHandler::Stop(); |
| 1366 return 0; | 1368 return 0; |
| 1367 } | 1369 } |
| 1368 | 1370 |
| 1369 } // namespace bin | 1371 } // namespace bin |
| 1370 } // namespace dart | 1372 } // namespace dart |
| 1371 | 1373 |
| 1372 int main(int argc, char** argv) { | 1374 int main(int argc, char** argv) { |
| 1373 return dart::bin::main(argc, argv); | 1375 return dart::bin::main(argc, argv); |
| 1374 } | 1376 } |
| OLD | NEW |