| 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 97 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 108 static const int kApiErrorExitCode = 253; | 108 static const int kApiErrorExitCode = 253; |
| 109 // Exit code indicating a compilation error. | 109 // Exit code indicating a compilation error. |
| 110 static const int kCompilationErrorExitCode = 254; | 110 static const int kCompilationErrorExitCode = 254; |
| 111 // Exit code indicating an unhandled error that is not a compilation error. | 111 // Exit code indicating an unhandled error that is not a compilation error. |
| 112 static const int kErrorExitCode = 255; | 112 static const int kErrorExitCode = 255; |
| 113 // Exit code indicating a vm restart request. Never returned to the user. | 113 // Exit code indicating a vm restart request. Never returned to the user. |
| 114 static const int kRestartRequestExitCode = 1000; | 114 static const int kRestartRequestExitCode = 1000; |
| 115 | 115 |
| 116 // Global flag that is used to indicate that the VM should do a clean | 116 // Global flag that is used to indicate that the VM should do a clean |
| 117 // shutdown. | 117 // shutdown. |
| 118 static bool do_vm_shutdown = false; | 118 static bool do_vm_shutdown = true; |
| 119 | 119 |
| 120 static void ErrorExit(int exit_code, const char* format, ...) { | 120 static void ErrorExit(int exit_code, const char* format, ...) { |
| 121 va_list arguments; | 121 va_list arguments; |
| 122 va_start(arguments, format); | 122 va_start(arguments, format); |
| 123 Log::VPrintErr(format, arguments); | 123 Log::VPrintErr(format, arguments); |
| 124 va_end(arguments); | 124 va_end(arguments); |
| 125 fflush(stderr); | 125 fflush(stderr); |
| 126 | 126 |
| 127 Dart_ExitScope(); | 127 Dart_ExitScope(); |
| 128 Dart_ShutdownIsolate(); | 128 Dart_ShutdownIsolate(); |
| (...skipping 1407 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1536 Platform::Exit(Process::GlobalExitCode()); | 1536 Platform::Exit(Process::GlobalExitCode()); |
| 1537 } | 1537 } |
| 1538 | 1538 |
| 1539 } // namespace bin | 1539 } // namespace bin |
| 1540 } // namespace dart | 1540 } // namespace dart |
| 1541 | 1541 |
| 1542 int main(int argc, char** argv) { | 1542 int main(int argc, char** argv) { |
| 1543 dart::bin::main(argc, argv); | 1543 dart::bin::main(argc, argv); |
| 1544 UNREACHABLE(); | 1544 UNREACHABLE(); |
| 1545 } | 1545 } |
| OLD | NEW |