| 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 895 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 906 break; | 906 break; |
| 907 case Dart_KernelCompilationStatus_Crash: | 907 case Dart_KernelCompilationStatus_Crash: |
| 908 *exit_code = kDartFrontendErrorExitCode; | 908 *exit_code = kDartFrontendErrorExitCode; |
| 909 break; | 909 break; |
| 910 case Dart_KernelCompilationStatus_Unknown: | 910 case Dart_KernelCompilationStatus_Unknown: |
| 911 *exit_code = kErrorExitCode; | 911 *exit_code = kErrorExitCode; |
| 912 break; | 912 break; |
| 913 } | 913 } |
| 914 if (!is_kernel) { | 914 if (!is_kernel) { |
| 915 free(const_cast<uint8_t*>(platform_file)); | 915 free(const_cast<uint8_t*>(platform_file)); |
| 916 delete reinterpret_cast<kernel::Program*>(kernel_platform); | 916 delete reinterpret_cast<dart::kernel::Program*>(kernel_platform); |
| 917 return NULL; | 917 return NULL; |
| 918 } | 918 } |
| 919 } else if (!isolate_run_app_snapshot) { | 919 } else if (!isolate_run_app_snapshot) { |
| 920 is_kernel = TryReadKernel(script_uri, &kernel_file, &kernel_length); | 920 is_kernel = TryReadKernel(script_uri, &kernel_file, &kernel_length); |
| 921 } | 921 } |
| 922 | 922 |
| 923 if (is_kernel) { | 923 if (is_kernel) { |
| 924 kernel_program = Dart_ReadKernelBinary(kernel_file, kernel_length); | 924 kernel_program = Dart_ReadKernelBinary(kernel_file, kernel_length); |
| 925 } | 925 } |
| 926 } | 926 } |
| (...skipping 827 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1754 Platform::Exit(Process::GlobalExitCode()); | 1754 Platform::Exit(Process::GlobalExitCode()); |
| 1755 } | 1755 } |
| 1756 | 1756 |
| 1757 } // namespace bin | 1757 } // namespace bin |
| 1758 } // namespace dart | 1758 } // namespace dart |
| 1759 | 1759 |
| 1760 int main(int argc, char** argv) { | 1760 int main(int argc, char** argv) { |
| 1761 dart::bin::main(argc, argv); | 1761 dart::bin::main(argc, argv); |
| 1762 UNREACHABLE(); | 1762 UNREACHABLE(); |
| 1763 } | 1763 } |
| OLD | NEW |