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

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

Issue 1138083003: - Add --trace-loading to trace resolution and loading. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 7 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 | Annotate | Revision Log
« no previous file with comments | « runtime/bin/dartutils.cc ('k') | runtime/bin/main.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 <stdlib.h> 8 #include <stdlib.h>
9 #include <string.h> 9 #include <string.h>
10 #include <stdio.h> 10 #include <stdio.h>
(...skipping 567 matching lines...) Expand 10 before | Expand all | Expand 10 after
578 Builtin::LoadAndCheckLibrary(Builtin::kBuiltinLibrary); 578 Builtin::LoadAndCheckLibrary(Builtin::kBuiltinLibrary);
579 CHECK_RESULT(builtin_lib); 579 CHECK_RESULT(builtin_lib);
580 580
581 // Ensure that we mark all libraries as loaded. 581 // Ensure that we mark all libraries as loaded.
582 result = Dart_FinalizeLoading(false); 582 result = Dart_FinalizeLoading(false);
583 CHECK_RESULT(result); 583 CHECK_RESULT(result);
584 584
585 // Prepare for script loading by setting up the 'print' and 'timer' 585 // Prepare for script loading by setting up the 'print' and 'timer'
586 // closures and setting up 'package root' for URI resolution. 586 // closures and setting up 'package root' for URI resolution.
587 result = 587 result =
588 DartUtils::PrepareForScriptLoading(package_root, false, builtin_lib); 588 DartUtils::PrepareForScriptLoading(package_root,
589 false,
590 false,
591 builtin_lib);
589 CHECK_RESULT(result); 592 CHECK_RESULT(result);
590 Dart_ExitScope(); 593 Dart_ExitScope();
591 Dart_ExitIsolate(); 594 Dart_ExitIsolate();
592 595
593 UriResolverIsolateScope::isolate = isolate; 596 UriResolverIsolateScope::isolate = isolate;
594 597
595 // Now we create an isolate into which we load all the code that needs to 598 // Now we create an isolate into which we load all the code that needs to
596 // be in the snapshot. 599 // be in the snapshot.
597 if (Dart_CreateIsolate(NULL, NULL, NULL, NULL, &error) == NULL) { 600 if (Dart_CreateIsolate(NULL, NULL, NULL, NULL, &error) == NULL) {
598 fprintf(stderr, "%s", error); 601 fprintf(stderr, "%s", error);
(...skipping 22 matching lines...) Expand all
621 } 624 }
622 return 0; 625 return 0;
623 } 626 }
624 627
625 } // namespace bin 628 } // namespace bin
626 } // namespace dart 629 } // namespace dart
627 630
628 int main(int argc, char** argv) { 631 int main(int argc, char** argv) {
629 return dart::bin::main(argc, argv); 632 return dart::bin::main(argc, argv);
630 } 633 }
OLDNEW
« no previous file with comments | « runtime/bin/dartutils.cc ('k') | runtime/bin/main.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698