| 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 593 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 604 Dart_Handle result = Dart_SetLibraryTagHandler(DartUtils::LibraryTagHandler); | 604 Dart_Handle result = Dart_SetLibraryTagHandler(DartUtils::LibraryTagHandler); |
| 605 CHECK_RESULT(result); | 605 CHECK_RESULT(result); |
| 606 | 606 |
| 607 if (Dart_IsServiceIsolate(isolate)) { | 607 if (Dart_IsServiceIsolate(isolate)) { |
| 608 // If this is the service isolate, load embedder specific bits and return. | 608 // If this is the service isolate, load embedder specific bits and return. |
| 609 if (!VmService::Setup(vm_service_server_ip, vm_service_server_port)) { | 609 if (!VmService::Setup(vm_service_server_ip, vm_service_server_port)) { |
| 610 *error = strdup(VmService::GetErrorMessage()); | 610 *error = strdup(VmService::GetErrorMessage()); |
| 611 return NULL; | 611 return NULL; |
| 612 } | 612 } |
| 613 Dart_ExitScope(); | 613 Dart_ExitScope(); |
| 614 if (has_compile_all) { |
| 615 result = Dart_CompileAll(); |
| 616 CHECK_RESULT(result); |
| 617 } |
| 614 Dart_ExitIsolate(); | 618 Dart_ExitIsolate(); |
| 615 return isolate; | 619 return isolate; |
| 616 } | 620 } |
| 617 | 621 |
| 618 // Load the specified application script into the newly created isolate. | 622 // Load the specified application script into the newly created isolate. |
| 619 | 623 |
| 620 // Prepare builtin and its dependent libraries for use to resolve URIs. | 624 // Prepare builtin and its dependent libraries for use to resolve URIs. |
| 621 // The builtin library is part of the core snapshot and would already be | 625 // The builtin library is part of the core snapshot and would already be |
| 622 // available here in the case of script snapshot loading. | 626 // available here in the case of script snapshot loading. |
| 623 Dart_Handle builtin_lib = | 627 Dart_Handle builtin_lib = |
| (...skipping 488 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1112 exit(Process::GlobalExitCode()); | 1116 exit(Process::GlobalExitCode()); |
| 1113 } | 1117 } |
| 1114 | 1118 |
| 1115 } // namespace bin | 1119 } // namespace bin |
| 1116 } // namespace dart | 1120 } // namespace dart |
| 1117 | 1121 |
| 1118 int main(int argc, char** argv) { | 1122 int main(int argc, char** argv) { |
| 1119 dart::bin::main(argc, argv); | 1123 dart::bin::main(argc, argv); |
| 1120 UNREACHABLE(); | 1124 UNREACHABLE(); |
| 1121 } | 1125 } |
| OLD | NEW |