| 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 733 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 744 return kErrorExitCode; // Indicates we encountered an error. | 744 return kErrorExitCode; // Indicates we encountered an error. |
| 745 } | 745 } |
| 746 delete [] isolate_name; | 746 delete [] isolate_name; |
| 747 | 747 |
| 748 Dart_Isolate isolate = Dart_CurrentIsolate(); | 748 Dart_Isolate isolate = Dart_CurrentIsolate(); |
| 749 ASSERT(isolate != NULL); | 749 ASSERT(isolate != NULL); |
| 750 Dart_Handle result; | 750 Dart_Handle result; |
| 751 | 751 |
| 752 Dart_EnterScope(); | 752 Dart_EnterScope(); |
| 753 | 753 |
| 754 if (vmstats_port >= 0) { | 754 VmStats::Start(vmstats_port, vmstats_root); |
| 755 VmStats::Start(vmstats_port, vmstats_root); | |
| 756 } | |
| 757 | 755 |
| 758 if (generate_script_snapshot) { | 756 if (generate_script_snapshot) { |
| 759 // First create a snapshot. | 757 // First create a snapshot. |
| 760 Dart_Handle result; | 758 Dart_Handle result; |
| 761 uint8_t* buffer = NULL; | 759 uint8_t* buffer = NULL; |
| 762 intptr_t size = 0; | 760 intptr_t size = 0; |
| 763 result = Dart_CreateScriptSnapshot(&buffer, &size); | 761 result = Dart_CreateScriptSnapshot(&buffer, &size); |
| 764 if (Dart_IsError(result)) { | 762 if (Dart_IsError(result)) { |
| 765 Log::PrintErr("%s\n", Dart_GetError(result)); | 763 Log::PrintErr("%s\n", Dart_GetError(result)); |
| 766 Dart_ExitScope(); | 764 Dart_ExitScope(); |
| (...skipping 64 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 831 Dart_ShutdownIsolate(); | 829 Dart_ShutdownIsolate(); |
| 832 // Terminate process exit-code handler. | 830 // Terminate process exit-code handler. |
| 833 Process::TerminateExitCodeHandler(); | 831 Process::TerminateExitCodeHandler(); |
| 834 // Free copied argument strings if converted. | 832 // Free copied argument strings if converted. |
| 835 if (argv_converted) { | 833 if (argv_converted) { |
| 836 for (int i = 0; i < argc; i++) free(argv[i]); | 834 for (int i = 0; i < argc; i++) free(argv[i]); |
| 837 } | 835 } |
| 838 | 836 |
| 839 return Process::GlobalExitCode(); | 837 return Process::GlobalExitCode(); |
| 840 } | 838 } |
| OLD | NEW |