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