Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(475)

Side by Side Diff: runtime/bin/gen_snapshot.cc

Issue 2948273002: Correctly set root_library based on the application script URI instead of looking for the library t… (Closed)
Patch Set: Integrate cl from Siggi for front end change to not require a 'main' method when using the memory f… Created 3 years, 5 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « runtime/bin/dfe.cc ('k') | runtime/bin/loader.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2013, 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 // Generate a snapshot file after loading all the scripts specified on the 5 // Generate a snapshot file after loading all the scripts specified on the
6 // command line. 6 // command line.
7 7
8 #include <stdio.h> 8 #include <stdio.h>
9 #include <stdlib.h> 9 #include <stdlib.h>
10 #include <string.h> 10 #include <string.h>
(...skipping 1731 matching lines...) Expand 10 before | Expand all | Expand 10 after
1742 CHECK_RESULT(result); 1742 CHECK_RESULT(result);
1743 1743
1744 if (commandline_packages_file != NULL) { 1744 if (commandline_packages_file != NULL) {
1745 AddDependency(commandline_packages_file); 1745 AddDependency(commandline_packages_file);
1746 } 1746 }
1747 1747
1748 Dart_QualifiedFunctionName* entry_points = 1748 Dart_QualifiedFunctionName* entry_points =
1749 ParseEntryPointsManifestIfPresent(); 1749 ParseEntryPointsManifestIfPresent();
1750 1750
1751 if (kernel_program != NULL) { 1751 if (kernel_program != NULL) {
1752 Dart_Handle library = Dart_LoadKernel(kernel_program); 1752 Dart_Handle resolved_uri = ResolveUriInWorkingDirectory(app_script_name);
1753 if (Dart_IsError(library)) FATAL("Failed to load app from Kernel IR"); 1753 CHECK_RESULT(resolved_uri);
1754 Dart_Handle library =
1755 Dart_LoadScript(resolved_uri, Dart_Null(),
1756 reinterpret_cast<Dart_Handle>(kernel_program), 0, 0);
1757 CHECK_RESULT(library);
1754 } else { 1758 } else {
1755 // Set up the library tag handler in such a manner that it will use the 1759 // Set up the library tag handler in such a manner that it will use the
1756 // URL mapping specified on the command line to load the libraries. 1760 // URL mapping specified on the command line to load the libraries.
1757 result = Dart_SetLibraryTagHandler(CreateSnapshotLibraryTagHandler); 1761 result = Dart_SetLibraryTagHandler(CreateSnapshotLibraryTagHandler);
1758 CHECK_RESULT(result); 1762 CHECK_RESULT(result);
1759 } 1763 }
1760 1764
1761 SetupStubNativeResolversForPrecompilation(entry_points); 1765 SetupStubNativeResolversForPrecompilation(entry_points);
1762 1766
1763 SetupStubNativeResolvers(); 1767 SetupStubNativeResolvers();
(...skipping 71 matching lines...) Expand 10 before | Expand all | Expand 10 after
1835 delete mapped_isolate_snapshot_instructions; 1839 delete mapped_isolate_snapshot_instructions;
1836 return 0; 1840 return 0;
1837 } 1841 }
1838 1842
1839 } // namespace bin 1843 } // namespace bin
1840 } // namespace dart 1844 } // namespace dart
1841 1845
1842 int main(int argc, char** argv) { 1846 int main(int argc, char** argv) {
1843 return dart::bin::main(argc, argv); 1847 return dart::bin::main(argc, argv);
1844 } 1848 }
OLDNEW
« no previous file with comments | « runtime/bin/dfe.cc ('k') | runtime/bin/loader.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698