OLD | NEW |
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 574 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
585 CHECK_RESULT(builtin_lib); | 585 CHECK_RESULT(builtin_lib); |
586 | 586 |
587 // Ensure that we mark all libraries as loaded. | 587 // Ensure that we mark all libraries as loaded. |
588 result = Dart_FinalizeLoading(false); | 588 result = Dart_FinalizeLoading(false); |
589 CHECK_RESULT(result); | 589 CHECK_RESULT(result); |
590 | 590 |
591 // Prepare for script loading by setting up the 'print' and 'timer' | 591 // Prepare for script loading by setting up the 'print' and 'timer' |
592 // closures and setting up 'package root' for URI resolution. | 592 // closures and setting up 'package root' for URI resolution. |
593 result = | 593 result = |
594 DartUtils::PrepareForScriptLoading(package_root, | 594 DartUtils::PrepareForScriptLoading(package_root, |
| 595 NULL, |
595 false, | 596 false, |
596 false, | 597 false, |
597 builtin_lib); | 598 builtin_lib); |
598 CHECK_RESULT(result); | 599 CHECK_RESULT(result); |
599 Dart_ExitScope(); | 600 Dart_ExitScope(); |
600 Dart_ExitIsolate(); | 601 Dart_ExitIsolate(); |
601 | 602 |
602 UriResolverIsolateScope::isolate = isolate; | 603 UriResolverIsolateScope::isolate = isolate; |
603 | 604 |
604 // Now we create an isolate into which we load all the code that needs to | 605 // Now we create an isolate into which we load all the code that needs to |
(...skipping 25 matching lines...) Expand all Loading... |
630 } | 631 } |
631 return 0; | 632 return 0; |
632 } | 633 } |
633 | 634 |
634 } // namespace bin | 635 } // namespace bin |
635 } // namespace dart | 636 } // namespace dart |
636 | 637 |
637 int main(int argc, char** argv) { | 638 int main(int argc, char** argv) { |
638 return dart::bin::main(argc, argv); | 639 return dart::bin::main(argc, argv); |
639 } | 640 } |
OLD | NEW |