| 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 1186 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1197 // Parse command line arguments. | 1197 // Parse command line arguments. |
| 1198 if (ParseArguments(argc, | 1198 if (ParseArguments(argc, |
| 1199 argv, | 1199 argv, |
| 1200 &vm_options, | 1200 &vm_options, |
| 1201 &app_script_name) < 0) { | 1201 &app_script_name) < 0) { |
| 1202 PrintUsage(); | 1202 PrintUsage(); |
| 1203 return 255; | 1203 return 255; |
| 1204 } | 1204 } |
| 1205 | 1205 |
| 1206 Thread::InitOnce(); | 1206 Thread::InitOnce(); |
| 1207 Loader::InitOnce(); |
| 1207 DartUtils::SetOriginalWorkingDirectory(); | 1208 DartUtils::SetOriginalWorkingDirectory(); |
| 1208 // Start event handler. | 1209 // Start event handler. |
| 1209 TimerUtils::InitOnce(); | 1210 TimerUtils::InitOnce(); |
| 1210 EventHandler::Start(); | 1211 EventHandler::Start(); |
| 1211 | 1212 |
| 1212 #if !defined(PRODUCT) | 1213 #if !defined(PRODUCT) |
| 1213 // Constant true in PRODUCT mode. | 1214 // Constant true in PRODUCT mode. |
| 1214 vm_options.AddArgument("--load_deferred_eagerly"); | 1215 vm_options.AddArgument("--load_deferred_eagerly"); |
| 1215 #endif | 1216 #endif |
| 1216 | 1217 |
| (...skipping 136 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1353 EventHandler::Stop(); | 1354 EventHandler::Stop(); |
| 1354 return 0; | 1355 return 0; |
| 1355 } | 1356 } |
| 1356 | 1357 |
| 1357 } // namespace bin | 1358 } // namespace bin |
| 1358 } // namespace dart | 1359 } // namespace dart |
| 1359 | 1360 |
| 1360 int main(int argc, char** argv) { | 1361 int main(int argc, char** argv) { |
| 1361 return dart::bin::main(argc, argv); | 1362 return dart::bin::main(argc, argv); |
| 1362 } | 1363 } |
| OLD | NEW |