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 673 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
684 PrintUsage(); | 684 PrintUsage(); |
685 return kErrorExitCode; | 685 return kErrorExitCode; |
686 } | 686 } |
687 } | 687 } |
688 | 688 |
689 Dart_SetVMFlags(vm_options.count(), vm_options.arguments()); | 689 Dart_SetVMFlags(vm_options.count(), vm_options.arguments()); |
690 | 690 |
691 // Initialize the Dart VM. | 691 // Initialize the Dart VM. |
692 if (!Dart_Initialize(CreateIsolateAndSetup, | 692 if (!Dart_Initialize(CreateIsolateAndSetup, |
693 NULL, | 693 NULL, |
| 694 NULL, |
694 ShutdownIsolate)) { | 695 ShutdownIsolate)) { |
695 return ErrorExit("VM initialization failed\n"); | 696 return ErrorExit("VM initialization failed\n"); |
696 } | 697 } |
697 | 698 |
698 DartUtils::SetOriginalWorkingDirectory(); | 699 DartUtils::SetOriginalWorkingDirectory(); |
699 | 700 |
700 // Start the debugger wire protocol handler if necessary. | 701 // Start the debugger wire protocol handler if necessary. |
701 if (start_debugger) { | 702 if (start_debugger) { |
702 ASSERT(debug_port != 0); | 703 ASSERT(debug_port != 0); |
703 DebuggerConnectionHandler::StartHandler(debug_ip, debug_port); | 704 DebuggerConnectionHandler::StartHandler(debug_ip, debug_port); |
(...skipping 67 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
771 Dart_ShutdownIsolate(); | 772 Dart_ShutdownIsolate(); |
772 // Terminate process exit-code handler. | 773 // Terminate process exit-code handler. |
773 Process::TerminateExitCodeHandler(); | 774 Process::TerminateExitCodeHandler(); |
774 // Free copied argument strings if converted. | 775 // Free copied argument strings if converted. |
775 if (argv_converted) { | 776 if (argv_converted) { |
776 for (int i = 0; i < argc; i++) free(argv[i]); | 777 for (int i = 0; i < argc; i++) free(argv[i]); |
777 } | 778 } |
778 | 779 |
779 return 0; | 780 return 0; |
780 } | 781 } |
OLD | NEW |