| 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 662 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 673 &executable_name, | 673 &executable_name, |
| 674 &script_name, | 674 &script_name, |
| 675 &dart_options) < 0) { | 675 &dart_options) < 0) { |
| 676 PrintUsage(); | 676 PrintUsage(); |
| 677 return kErrorExitCode; | 677 return kErrorExitCode; |
| 678 } | 678 } |
| 679 | 679 |
| 680 Dart_SetVMFlags(vm_options.count(), vm_options.arguments()); | 680 Dart_SetVMFlags(vm_options.count(), vm_options.arguments()); |
| 681 | 681 |
| 682 // Initialize the Dart VM. | 682 // Initialize the Dart VM. |
| 683 Dart_Initialize(CreateIsolateAndSetup, NULL); | 683 Dart_Initialize(CreateIsolateAndSetup, NULL, NULL); |
| 684 | 684 |
| 685 original_working_directory = Directory::Current(); | 685 original_working_directory = Directory::Current(); |
| 686 | 686 |
| 687 // Call CreateIsolateAndSetup which creates an isolate and loads up | 687 // Call CreateIsolateAndSetup which creates an isolate and loads up |
| 688 // the specified application script. | 688 // the specified application script. |
| 689 char* error = NULL; | 689 char* error = NULL; |
| 690 char* isolate_name = BuildIsolateName(script_name, "main"); | 690 char* isolate_name = BuildIsolateName(script_name, "main"); |
| 691 if (!CreateIsolateAndSetupHelper(script_name, | 691 if (!CreateIsolateAndSetupHelper(script_name, |
| 692 "main", | 692 "main", |
| 693 true, // Canonicalize the script name. | 693 true, // Canonicalize the script name. |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 758 DumpPprofSymbolInfo(); | 758 DumpPprofSymbolInfo(); |
| 759 // Shutdown the isolate. | 759 // Shutdown the isolate. |
| 760 Dart_ShutdownIsolate(); | 760 Dart_ShutdownIsolate(); |
| 761 // Terminate process exit-code handler. | 761 // Terminate process exit-code handler. |
| 762 Process::TerminateExitCodeHandler(); | 762 Process::TerminateExitCodeHandler(); |
| 763 | 763 |
| 764 free(const_cast<char*>(original_working_directory)); | 764 free(const_cast<char*>(original_working_directory)); |
| 765 | 765 |
| 766 return 0; | 766 return 0; |
| 767 } | 767 } |
| OLD | NEW |