| 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 <stdlib.h> | 8 #include <stdlib.h> |
| 9 #include <string.h> | 9 #include <string.h> |
| 10 #include <stdio.h> | 10 #include <stdio.h> |
| (...skipping 1011 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1022 // Start event handler. | 1022 // Start event handler. |
| 1023 EventHandler::Start(); | 1023 EventHandler::Start(); |
| 1024 | 1024 |
| 1025 vm_options.AddArgument("--load_deferred_eagerly"); | 1025 vm_options.AddArgument("--load_deferred_eagerly"); |
| 1026 // Workaround until issue 21620 is fixed. | 1026 // Workaround until issue 21620 is fixed. |
| 1027 // (https://github.com/dart-lang/sdk/issues/21620) | 1027 // (https://github.com/dart-lang/sdk/issues/21620) |
| 1028 vm_options.AddArgument("--no-concurrent_sweep"); | 1028 vm_options.AddArgument("--no-concurrent_sweep"); |
| 1029 | 1029 |
| 1030 if (IsSnapshottingForPrecompilation()) { | 1030 if (IsSnapshottingForPrecompilation()) { |
| 1031 vm_options.AddArgument("--precompilation"); | 1031 vm_options.AddArgument("--precompilation"); |
| 1032 #if TARGET_ARCH_ARM |
| 1033 // This is for the iPod Touch 5th Generation (and maybe other older devices) |
| 1034 vm_options.AddArgument("--no-use_integer_division"); |
| 1035 #endif |
| 1032 } | 1036 } |
| 1033 | 1037 |
| 1034 Dart_SetVMFlags(vm_options.count(), vm_options.arguments()); | 1038 Dart_SetVMFlags(vm_options.count(), vm_options.arguments()); |
| 1035 | 1039 |
| 1036 // Initialize the Dart VM. | 1040 // Initialize the Dart VM. |
| 1037 // Note: We don't expect isolates to be created from dart code during | 1041 // Note: We don't expect isolates to be created from dart code during |
| 1038 // snapshot generation. | 1042 // snapshot generation. |
| 1039 char* error = Dart_Initialize( | 1043 char* error = Dart_Initialize( |
| 1040 NULL, | 1044 NULL, |
| 1041 NULL, | 1045 NULL, |
| (...skipping 107 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1149 EventHandler::Stop(); | 1153 EventHandler::Stop(); |
| 1150 return 0; | 1154 return 0; |
| 1151 } | 1155 } |
| 1152 | 1156 |
| 1153 } // namespace bin | 1157 } // namespace bin |
| 1154 } // namespace dart | 1158 } // namespace dart |
| 1155 | 1159 |
| 1156 int main(int argc, char** argv) { | 1160 int main(int argc, char** argv) { |
| 1157 return dart::bin::main(argc, argv); | 1161 return dart::bin::main(argc, argv); |
| 1158 } | 1162 } |
| OLD | NEW |