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

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

Issue 2527473002: Fix gen_snapshot product mode build (Closed)
Patch Set: Created 4 years 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 | « no previous file | runtime/include/dart_api.h » ('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 723 matching lines...) Expand 10 before | Expand all | Expand 10 after
734 Dart_Handle result = 734 Dart_Handle result =
735 Dart_SetNativeResolver(library, &StubNativeLookup, &StubNativeSymbol); 735 Dart_SetNativeResolver(library, &StubNativeLookup, &StubNativeSymbol);
736 DART_CHECK_VALID(result); 736 DART_CHECK_VALID(result);
737 } 737 }
738 738
739 739
740 // Iterate over all libraries and setup the stub native lookup. This must be 740 // Iterate over all libraries and setup the stub native lookup. This must be
741 // run after |SetupStubNativeResolversForPrecompilation| because the former 741 // run after |SetupStubNativeResolversForPrecompilation| because the former
742 // loads some libraries. 742 // loads some libraries.
743 static void SetupStubNativeResolvers() { 743 static void SetupStubNativeResolvers() {
744 Dart_Handle library_ids = Dart_GetLibraryIds(); 744 Dart_Handle libraries = Dart_GetLoadedLibraries();
745 intptr_t library_ids_length; 745 intptr_t libraries_length;
746 Dart_ListLength(library_ids, &library_ids_length); 746 Dart_ListLength(libraries, &libraries_length);
747 for (intptr_t i = 0; i < library_ids_length; i++) { 747 for (intptr_t i = 0; i < libraries_length; i++) {
748 Dart_Handle library_id_handle = Dart_ListGetAt(library_ids, i); 748 Dart_Handle library = Dart_ListGetAt(libraries, i);
749 DART_CHECK_VALID(library_id_handle);
750 int64_t library_id;
751 Dart_IntegerToInt64(library_id_handle, &library_id);
752 Dart_Handle library = Dart_GetLibraryFromId(library_id);
753 DART_CHECK_VALID(library); 749 DART_CHECK_VALID(library);
754 Dart_NativeEntryResolver old_resolver = NULL; 750 Dart_NativeEntryResolver old_resolver = NULL;
755 Dart_GetNativeResolver(library, &old_resolver); 751 Dart_GetNativeResolver(library, &old_resolver);
756 if (old_resolver == NULL) { 752 if (old_resolver == NULL) {
757 Dart_Handle result = 753 Dart_Handle result =
758 Dart_SetNativeResolver(library, &StubNativeLookup, &StubNativeSymbol); 754 Dart_SetNativeResolver(library, &StubNativeLookup, &StubNativeSymbol);
759 DART_CHECK_VALID(result); 755 DART_CHECK_VALID(result);
760 } 756 }
761 } 757 }
762 } 758 }
(...skipping 606 matching lines...) Expand 10 before | Expand all | Expand 10 after
1369 EventHandler::Stop(); 1365 EventHandler::Stop();
1370 return 0; 1366 return 0;
1371 } 1367 }
1372 1368
1373 } // namespace bin 1369 } // namespace bin
1374 } // namespace dart 1370 } // namespace dart
1375 1371
1376 int main(int argc, char** argv) { 1372 int main(int argc, char** argv) {
1377 return dart::bin::main(argc, argv); 1373 return dart::bin::main(argc, argv);
1378 } 1374 }
OLDNEW
« no previous file with comments | « no previous file | runtime/include/dart_api.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698