| 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 1015 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1026 bool print_msg = verbose_debug_seen || (debug_port == 0); | 1026 bool print_msg = verbose_debug_seen || (debug_port == 0); |
| 1027 debug_port = DebuggerConnectionHandler::StartHandler(debug_ip, debug_port); | 1027 debug_port = DebuggerConnectionHandler::StartHandler(debug_ip, debug_port); |
| 1028 if (print_msg) { | 1028 if (print_msg) { |
| 1029 Log::Print("Debugger listening on port %d\n", debug_port); | 1029 Log::Print("Debugger listening on port %d\n", debug_port); |
| 1030 } | 1030 } |
| 1031 } else { | 1031 } else { |
| 1032 DebuggerConnectionHandler::InitForVmService(); | 1032 DebuggerConnectionHandler::InitForVmService(); |
| 1033 } | 1033 } |
| 1034 | 1034 |
| 1035 // Initialize the Dart VM. | 1035 // Initialize the Dart VM. |
| 1036 if (!Dart_Initialize(vm_isolate_snapshot_buffer, | 1036 if (!Dart_Initialize(vm_isolate_snapshot_buffer, NULL, |
| 1037 CreateIsolateAndSetup, NULL, NULL, ShutdownIsolate, | 1037 CreateIsolateAndSetup, NULL, NULL, ShutdownIsolate, |
| 1038 DartUtils::OpenFile, | 1038 DartUtils::OpenFile, |
| 1039 DartUtils::ReadFile, | 1039 DartUtils::ReadFile, |
| 1040 DartUtils::WriteFile, | 1040 DartUtils::WriteFile, |
| 1041 DartUtils::CloseFile, | 1041 DartUtils::CloseFile, |
| 1042 DartUtils::EntropySource)) { | 1042 DartUtils::EntropySource)) { |
| 1043 fprintf(stderr, "%s", "VM initialization failed\n"); | 1043 fprintf(stderr, "%s", "VM initialization failed\n"); |
| 1044 fflush(stderr); | 1044 fflush(stderr); |
| 1045 exit(kErrorExitCode); | 1045 exit(kErrorExitCode); |
| 1046 } | 1046 } |
| (...skipping 143 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1190 exit(Process::GlobalExitCode()); | 1190 exit(Process::GlobalExitCode()); |
| 1191 } | 1191 } |
| 1192 | 1192 |
| 1193 } // namespace bin | 1193 } // namespace bin |
| 1194 } // namespace dart | 1194 } // namespace dart |
| 1195 | 1195 |
| 1196 int main(int argc, char** argv) { | 1196 int main(int argc, char** argv) { |
| 1197 dart::bin::main(argc, argv); | 1197 dart::bin::main(argc, argv); |
| 1198 UNREACHABLE(); | 1198 UNREACHABLE(); |
| 1199 } | 1199 } |
| OLD | NEW |