| 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 305 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 316 static bool ProcessGenPrecompiledSnapshotOption( | 316 static bool ProcessGenPrecompiledSnapshotOption( |
| 317 const char* arg, | 317 const char* arg, |
| 318 CommandLineOptions* vm_options) { | 318 CommandLineOptions* vm_options) { |
| 319 ASSERT(arg != NULL); | 319 ASSERT(arg != NULL); |
| 320 if (*arg != '\0') { | 320 if (*arg != '\0') { |
| 321 return false; | 321 return false; |
| 322 } | 322 } |
| 323 // Ensure that we are not already running using a full snapshot. | 323 // Ensure that we are not already running using a full snapshot. |
| 324 if (isolate_snapshot_buffer != NULL) { | 324 if (isolate_snapshot_buffer != NULL) { |
| 325 Log::PrintErr("Precompiled snapshots must be generated with" | 325 Log::PrintErr("Precompiled snapshots must be generated with" |
| 326 " dart_no_snapshot."); | 326 " dart_no_snapshot.\n"); |
| 327 return false; | 327 return false; |
| 328 } | 328 } |
| 329 has_gen_precompiled_snapshot = true; | 329 has_gen_precompiled_snapshot = true; |
| 330 vm_options->AddArgument("--precompile"); | 330 vm_options->AddArgument("--precompile"); |
| 331 return true; | 331 return true; |
| 332 } | 332 } |
| 333 | 333 |
| 334 | 334 |
| 335 static bool ProcessRunPrecompiledSnapshotOption( | 335 static bool ProcessRunPrecompiledSnapshotOption( |
| 336 const char* arg, | 336 const char* arg, |
| (...skipping 1033 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1370 exit(Process::GlobalExitCode()); | 1370 exit(Process::GlobalExitCode()); |
| 1371 } | 1371 } |
| 1372 | 1372 |
| 1373 } // namespace bin | 1373 } // namespace bin |
| 1374 } // namespace dart | 1374 } // namespace dart |
| 1375 | 1375 |
| 1376 int main(int argc, char** argv) { | 1376 int main(int argc, char** argv) { |
| 1377 dart::bin::main(argc, argv); | 1377 dart::bin::main(argc, argv); |
| 1378 UNREACHABLE(); | 1378 UNREACHABLE(); |
| 1379 } | 1379 } |
| OLD | NEW |