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

Side by Side Diff: pkg/compiler/lib/src/compiler.dart

Issue 785303003: Add option for outputting a deferred loading mapping. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Whitespace Created 5 years, 11 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
OLDNEW
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 part of dart2js; 5 part of dart2js;
6 6
7 /** 7 /**
8 * If true, print a warning for each method that was resolved, but not 8 * If true, print a warning for each method that was resolved, but not
9 * compiled. 9 * compiled.
10 */ 10 */
(...skipping 650 matching lines...) Expand 10 before | Expand all | Expand 10 after
661 661
662 /// When `true` emits URIs in the reflection metadata. 662 /// When `true` emits URIs in the reflection metadata.
663 final bool preserveUris; 663 final bool preserveUris;
664 664
665 final bool enableTypeAssertions; 665 final bool enableTypeAssertions;
666 final bool enableUserAssertions; 666 final bool enableUserAssertions;
667 final bool trustTypeAnnotations; 667 final bool trustTypeAnnotations;
668 final bool trustPrimitives; 668 final bool trustPrimitives;
669 final bool enableConcreteTypeInference; 669 final bool enableConcreteTypeInference;
670 final bool disableTypeInferenceFlag; 670 final bool disableTypeInferenceFlag;
671 final Uri deferredMapUri;
671 final bool dumpInfo; 672 final bool dumpInfo;
672 final bool useContentSecurityPolicy; 673 final bool useContentSecurityPolicy;
673 final bool enableExperimentalMirrors; 674 final bool enableExperimentalMirrors;
674 675
675 /** 676 /**
676 * The maximum size of a concrete type before it widens to dynamic during 677 * The maximum size of a concrete type before it widens to dynamic during
677 * concrete type inference. 678 * concrete type inference.
678 */ 679 */
679 final int maxConcreteTypeSize; 680 final int maxConcreteTypeSize;
680 final bool analyzeAllFlag; 681 final bool analyzeAllFlag;
(...skipping 296 matching lines...) Expand 10 before | Expand all | Expand 10 after
977 bool analyzeAllFlag: false, 978 bool analyzeAllFlag: false,
978 bool analyzeOnly: false, 979 bool analyzeOnly: false,
979 this.analyzeMain: false, 980 this.analyzeMain: false,
980 bool analyzeSignaturesOnly: false, 981 bool analyzeSignaturesOnly: false,
981 this.preserveComments: false, 982 this.preserveComments: false,
982 this.verbose: false, 983 this.verbose: false,
983 this.sourceMapUri: null, 984 this.sourceMapUri: null,
984 this.outputUri: null, 985 this.outputUri: null,
985 this.buildId: UNDETERMINED_BUILD_ID, 986 this.buildId: UNDETERMINED_BUILD_ID,
986 this.terseDiagnostics: false, 987 this.terseDiagnostics: false,
988 this.deferredMapUri: null,
987 this.dumpInfo: false, 989 this.dumpInfo: false,
988 this.showPackageWarnings: false, 990 this.showPackageWarnings: false,
989 this.useContentSecurityPolicy: false, 991 this.useContentSecurityPolicy: false,
990 this.suppressWarnings: false, 992 this.suppressWarnings: false,
991 bool hasIncrementalSupport: false, 993 bool hasIncrementalSupport: false,
992 this.enableExperimentalMirrors: false, 994 this.enableExperimentalMirrors: false,
993 this.enableAsyncAwait: false, 995 this.enableAsyncAwait: false,
994 this.enableEnums: false, 996 this.enableEnums: false,
995 this.allowNativeExtensions: false, 997 this.allowNativeExtensions: false,
996 api.CompilerOutputProvider outputProvider, 998 api.CompilerOutputProvider outputProvider,
(...skipping 528 matching lines...) Expand 10 before | Expand all | Expand 10 after
1525 /// Performs the compilation when all libraries have been loaded. 1527 /// Performs the compilation when all libraries have been loaded.
1526 void compileLoadedLibraries() { 1528 void compileLoadedLibraries() {
1527 computeMain(); 1529 computeMain();
1528 1530
1529 mirrorUsageAnalyzerTask.analyzeUsage(mainApp); 1531 mirrorUsageAnalyzerTask.analyzeUsage(mainApp);
1530 1532
1531 // In order to see if a library is deferred, we must compute the 1533 // In order to see if a library is deferred, we must compute the
1532 // compile-time constants that are metadata. This means adding 1534 // compile-time constants that are metadata. This means adding
1533 // something to the resolution queue. So we cannot wait with 1535 // something to the resolution queue. So we cannot wait with
1534 // this until after the resolution queue is processed. 1536 // this until after the resolution queue is processed.
1535 deferredLoadTask.ensureMetadataResolved(this); 1537 deferredLoadTask.beforeResolution(this);
1536 1538
1537 phase = PHASE_RESOLVING; 1539 phase = PHASE_RESOLVING;
1538 if (analyzeAll) { 1540 if (analyzeAll) {
1539 libraryLoader.libraries.forEach((LibraryElement library) { 1541 libraryLoader.libraries.forEach((LibraryElement library) {
1540 log('Enqueuing ${library.canonicalUri}'); 1542 log('Enqueuing ${library.canonicalUri}');
1541 fullyEnqueueLibrary(library, enqueuer.resolution); 1543 fullyEnqueueLibrary(library, enqueuer.resolution);
1542 }); 1544 });
1543 } else if (analyzeMain && mainApp != null) { 1545 } else if (analyzeMain && mainApp != null) {
1544 fullyEnqueueLibrary(mainApp, enqueuer.resolution); 1546 fullyEnqueueLibrary(mainApp, enqueuer.resolution);
1545 } 1547 }
(...skipping 862 matching lines...) Expand 10 before | Expand all | Expand 10 after
2408 InterfaceType get nullType => nullClass.computeType(compiler); 2410 InterfaceType get nullType => nullClass.computeType(compiler);
2409 2411
2410 @override 2412 @override
2411 InterfaceType get numType => numClass.computeType(compiler); 2413 InterfaceType get numType => numClass.computeType(compiler);
2412 2414
2413 @override 2415 @override
2414 InterfaceType get stringType => stringClass.computeType(compiler); 2416 InterfaceType get stringType => stringClass.computeType(compiler);
2415 } 2417 }
2416 2418
2417 typedef void InternalErrorFunction(Spannable location, String message); 2419 typedef void InternalErrorFunction(Spannable location, String message);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698