| 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_debugger_api.h" | 10 #include "include/dart_debugger_api.h" |
| (...skipping 805 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 816 return kErrorExitCode; | 816 return kErrorExitCode; |
| 817 } | 817 } |
| 818 | 818 |
| 819 Dart_SetVMFlags(vm_options.count(), vm_options.arguments()); | 819 Dart_SetVMFlags(vm_options.count(), vm_options.arguments()); |
| 820 | 820 |
| 821 // Initialize the Dart VM. | 821 // Initialize the Dart VM. |
| 822 if (!Dart_Initialize(CreateIsolateAndSetup, NULL, NULL, ShutdownIsolate, | 822 if (!Dart_Initialize(CreateIsolateAndSetup, NULL, NULL, ShutdownIsolate, |
| 823 DartUtils::OpenFile, | 823 DartUtils::OpenFile, |
| 824 DartUtils::ReadFile, | 824 DartUtils::ReadFile, |
| 825 DartUtils::WriteFile, | 825 DartUtils::WriteFile, |
| 826 DartUtils::CloseFile)) { | 826 DartUtils::CloseFile, |
| 827 DartUtils::EntropySource)) { |
| 827 fprintf(stderr, "%s", "VM initialization failed\n"); | 828 fprintf(stderr, "%s", "VM initialization failed\n"); |
| 828 fflush(stderr); | 829 fflush(stderr); |
| 829 return kErrorExitCode; | 830 return kErrorExitCode; |
| 830 } | 831 } |
| 831 | 832 |
| 832 // Start the debugger wire protocol handler if necessary. | 833 // Start the debugger wire protocol handler if necessary. |
| 833 if (start_debugger) { | 834 if (start_debugger) { |
| 834 ASSERT(debug_port >= 0); | 835 ASSERT(debug_port >= 0); |
| 835 bool print_msg = verbose_debug_seen || (debug_port == 0); | 836 bool print_msg = verbose_debug_seen || (debug_port == 0); |
| 836 debug_port = DebuggerConnectionHandler::StartHandler(debug_ip, debug_port); | 837 debug_port = DebuggerConnectionHandler::StartHandler(debug_ip, debug_port); |
| (...skipping 176 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1013 | 1014 |
| 1014 return Process::GlobalExitCode(); | 1015 return Process::GlobalExitCode(); |
| 1015 } | 1016 } |
| 1016 | 1017 |
| 1017 } // namespace bin | 1018 } // namespace bin |
| 1018 } // namespace dart | 1019 } // namespace dart |
| 1019 | 1020 |
| 1020 int main(int argc, char** argv) { | 1021 int main(int argc, char** argv) { |
| 1021 return dart::bin::main(argc, argv); | 1022 return dart::bin::main(argc, argv); |
| 1022 } | 1023 } |
| OLD | NEW |