| 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_tools_api.h" | 10 #include "include/dart_tools_api.h" |
| (...skipping 794 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 805 return isolate; | 805 return isolate; |
| 806 } | 806 } |
| 807 #endif // defined(DART_PRODUCT_BINARY) | 807 #endif // defined(DART_PRODUCT_BINARY) |
| 808 | 808 |
| 809 // Prepare builtin and other core libraries for use to resolve URIs. | 809 // Prepare builtin and other core libraries for use to resolve URIs. |
| 810 // Set up various closures, e.g: printing, timers etc. | 810 // Set up various closures, e.g: printing, timers etc. |
| 811 // Set up 'package root' for URI resolution. | 811 // Set up 'package root' for URI resolution. |
| 812 result = DartUtils::PrepareForScriptLoading(false, trace_loading); | 812 result = DartUtils::PrepareForScriptLoading(false, trace_loading); |
| 813 CHECK_RESULT(result); | 813 CHECK_RESULT(result); |
| 814 | 814 |
| 815 if (run_service_isolate) { | 815 if (!run_precompiled_snapshot && !run_full_snapshot) { |
| 816 // Set up the load port provided by the service isolate so that we can | 816 // Set up the load port provided by the service isolate so that we can |
| 817 // load scripts. | 817 // load scripts. |
| 818 // With a full snapshot or a precompiled snapshot in product mode, there is |
| 819 // no service isolate. A precompiled snapshot in release or debug mode does |
| 820 // have the service isolate, but it doesn't use it for loading. |
| 818 result = DartUtils::SetupServiceLoadPort(); | 821 result = DartUtils::SetupServiceLoadPort(); |
| 819 CHECK_RESULT(result); | 822 CHECK_RESULT(result); |
| 820 } | 823 } |
| 821 | 824 |
| 822 // Setup package root if specified. | 825 // Setup package root if specified. |
| 823 result = DartUtils::SetupPackageRoot(package_root, packages_config); | 826 result = DartUtils::SetupPackageRoot(package_root, packages_config); |
| 824 CHECK_RESULT(result); | 827 CHECK_RESULT(result); |
| 825 | 828 |
| 826 result = Dart_SetEnvironmentCallback(EnvironmentCallback); | 829 result = Dart_SetEnvironmentCallback(EnvironmentCallback); |
| 827 CHECK_RESULT(result); | 830 CHECK_RESULT(result); |
| (...skipping 869 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 1697 Platform::Exit(Process::GlobalExitCode()); | 1700 Platform::Exit(Process::GlobalExitCode()); |
| 1698 } | 1701 } |
| 1699 | 1702 |
| 1700 } // namespace bin | 1703 } // namespace bin |
| 1701 } // namespace dart | 1704 } // namespace dart |
| 1702 | 1705 |
| 1703 int main(int argc, char** argv) { | 1706 int main(int argc, char** argv) { |
| 1704 dart::bin::main(argc, argv); | 1707 dart::bin::main(argc, argv); |
| 1705 UNREACHABLE(); | 1708 UNREACHABLE(); |
| 1706 } | 1709 } |
| OLD | NEW |