| 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 363 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 374 ASSERT(filename != NULL); | 374 ASSERT(filename != NULL); |
| 375 if (filename[0] == '\0') { | 375 if (filename[0] == '\0') { |
| 376 return false; | 376 return false; |
| 377 } | 377 } |
| 378 dfe.set_frontend_filename(filename); | 378 dfe.set_frontend_filename(filename); |
| 379 vm_options->AddArgument("--use-dart-frontend"); | 379 vm_options->AddArgument("--use-dart-frontend"); |
| 380 return true; | 380 return true; |
| 381 } | 381 } |
| 382 | 382 |
| 383 | 383 |
| 384 static bool ProcessPlatformOption(const char* filename, | 384 static bool ProcessKernelBinariesOption(const char* dirname, |
| 385 CommandLineOptions* vm_options) { | 385 CommandLineOptions* vm_options) { |
| 386 ASSERT(filename != NULL); | 386 ASSERT(dirname != NULL); |
| 387 if (filename[0] == '\0') { | 387 if (dirname[0] == '\0') { |
| 388 return false; | 388 return false; |
| 389 } | 389 } |
| 390 dfe.set_platform_binary_filename(filename); | 390 dfe.SetKernelBinaries(dirname); |
| 391 return true; | 391 return true; |
| 392 } | 392 } |
| 393 #endif | 393 #endif |
| 394 | 394 |
| 395 | 395 |
| 396 static bool ProcessUseBlobsOption(const char* arg, | 396 static bool ProcessUseBlobsOption(const char* arg, |
| 397 CommandLineOptions* vm_options) { | 397 CommandLineOptions* vm_options) { |
| 398 ASSERT(arg != NULL); | 398 ASSERT(arg != NULL); |
| 399 if (*arg != '\0') { | 399 if (*arg != '\0') { |
| 400 return false; | 400 return false; |
| (...skipping 208 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 609 {"--package-root=", ProcessPackageRootOption}, | 609 {"--package-root=", ProcessPackageRootOption}, |
| 610 {"-v", ProcessVerboseOption}, | 610 {"-v", ProcessVerboseOption}, |
| 611 {"--verbose", ProcessVerboseOption}, | 611 {"--verbose", ProcessVerboseOption}, |
| 612 {"--version", ProcessVersionOption}, | 612 {"--version", ProcessVersionOption}, |
| 613 | 613 |
| 614 // VM specific options to the standalone dart program. | 614 // VM specific options to the standalone dart program. |
| 615 {"--compile_all", ProcessCompileAllOption}, | 615 {"--compile_all", ProcessCompileAllOption}, |
| 616 {"--parse_all", ProcessParseAllOption}, | 616 {"--parse_all", ProcessParseAllOption}, |
| 617 #if !defined(DART_PRECOMPILED_RUNTIME) | 617 #if !defined(DART_PRECOMPILED_RUNTIME) |
| 618 {"--dfe=", ProcessFrontendOption}, | 618 {"--dfe=", ProcessFrontendOption}, |
| 619 {"--platform=", ProcessPlatformOption}, | 619 {"--kernel-binaries=", ProcessKernelBinariesOption}, |
| 620 #endif | 620 #endif |
| 621 {"--enable-vm-service", ProcessEnableVmServiceOption}, | 621 {"--enable-vm-service", ProcessEnableVmServiceOption}, |
| 622 {"--disable-service-origin-check", ProcessDisableServiceOriginCheckOption}, | 622 {"--disable-service-origin-check", ProcessDisableServiceOriginCheckOption}, |
| 623 {"--observe", ProcessObserveOption}, | 623 {"--observe", ProcessObserveOption}, |
| 624 {"--snapshot=", ProcessSnapshotFilenameOption}, | 624 {"--snapshot=", ProcessSnapshotFilenameOption}, |
| 625 {"--snapshot-kind=", ProcessSnapshotKindOption}, | 625 {"--snapshot-kind=", ProcessSnapshotKindOption}, |
| 626 {"--snapshot-depfile=", ProcessSnapshotDepsFilenameOption}, | 626 {"--snapshot-depfile=", ProcessSnapshotDepsFilenameOption}, |
| 627 {"--use-blobs", ProcessUseBlobsOption}, | 627 {"--use-blobs", ProcessUseBlobsOption}, |
| 628 {"--save-compilation-trace=", ProcessSaveCompilationTraceOption}, | 628 {"--save-compilation-trace=", ProcessSaveCompilationTraceOption}, |
| 629 {"--load-compilation-trace=", ProcessLoadCompilationTraceOption}, | 629 {"--load-compilation-trace=", ProcessLoadCompilationTraceOption}, |
| (...skipping 1287 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1917 Platform::Exit(Process::GlobalExitCode()); | 1917 Platform::Exit(Process::GlobalExitCode()); |
| 1918 } | 1918 } |
| 1919 | 1919 |
| 1920 } // namespace bin | 1920 } // namespace bin |
| 1921 } // namespace dart | 1921 } // namespace dart |
| 1922 | 1922 |
| 1923 int main(int argc, char** argv) { | 1923 int main(int argc, char** argv) { |
| 1924 dart::bin::main(argc, argv); | 1924 dart::bin::main(argc, argv); |
| 1925 UNREACHABLE(); | 1925 UNREACHABLE(); |
| 1926 } | 1926 } |
| OLD | NEW |