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

Side by Side Diff: sdk/lib/_internal/compiler/implementation/compiler.dart

Issue 185743002: Make analyze-all imply analyze-only. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 years, 9 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 595 matching lines...) Expand 10 before | Expand all | Expand 10 after
606 this.enableTypeAssertions: false, 606 this.enableTypeAssertions: false,
607 this.enableUserAssertions: false, 607 this.enableUserAssertions: false,
608 this.trustTypeAnnotations: false, 608 this.trustTypeAnnotations: false,
609 this.enableConcreteTypeInference: false, 609 this.enableConcreteTypeInference: false,
610 this.disableTypeInferenceFlag: false, 610 this.disableTypeInferenceFlag: false,
611 this.maxConcreteTypeSize: 5, 611 this.maxConcreteTypeSize: 5,
612 this.enableMinification: false, 612 this.enableMinification: false,
613 this.enableNativeLiveTypeAnalysis: false, 613 this.enableNativeLiveTypeAnalysis: false,
614 bool emitJavaScript: true, 614 bool emitJavaScript: true,
615 bool generateSourceMap: true, 615 bool generateSourceMap: true,
616 this.analyzeAllFlag: false, 616 bool analyzeAllFlag: false,
617 bool analyzeOnly: false, 617 bool analyzeOnly: false,
618 bool analyzeSignaturesOnly: false, 618 bool analyzeSignaturesOnly: false,
619 this.preserveComments: false, 619 this.preserveComments: false,
620 this.verbose: false, 620 this.verbose: false,
621 this.sourceMapUri: null, 621 this.sourceMapUri: null,
622 this.buildId: UNDETERMINED_BUILD_ID, 622 this.buildId: UNDETERMINED_BUILD_ID,
623 this.terseDiagnostics: false, 623 this.terseDiagnostics: false,
624 this.dumpInfo: false, 624 this.dumpInfo: false,
625 this.hidePackageWarnings: false, 625 this.hidePackageWarnings: false,
626 outputProvider, 626 outputProvider,
627 List<String> strips: const []}) 627 List<String> strips: const []})
628 : this.analyzeOnly = analyzeOnly || analyzeSignaturesOnly, 628 : this.analyzeOnly =
629 analyzeOnly || analyzeSignaturesOnly || analyzeAllFlag,
629 this.analyzeSignaturesOnly = analyzeSignaturesOnly, 630 this.analyzeSignaturesOnly = analyzeSignaturesOnly,
631 this.analyzeAllFlag = analyzeAllFlag,
630 this.outputProvider = (outputProvider == null) 632 this.outputProvider = (outputProvider == null)
631 ? NullSink.outputProvider 633 ? NullSink.outputProvider
632 : outputProvider { 634 : outputProvider {
633 world = new World(this); 635 world = new World(this);
634 636
635 closureMapping.ClosureNamer closureNamer; 637 closureMapping.ClosureNamer closureNamer;
636 if (emitJavaScript) { 638 if (emitJavaScript) {
637 js_backend.JavaScriptBackend jsBackend = 639 js_backend.JavaScriptBackend jsBackend =
638 new js_backend.JavaScriptBackend(this, generateSourceMap); 640 new js_backend.JavaScriptBackend(this, generateSourceMap);
639 closureNamer = jsBackend.namer; 641 closureNamer = jsBackend.namer;
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
1004 // such caches in the compiler and get access to them through a 1006 // such caches in the compiler and get access to them through a
1005 // suitably maintained static reference to the current compiler. 1007 // suitably maintained static reference to the current compiler.
1006 StringToken.canonicalizedSubstrings.clear(); 1008 StringToken.canonicalizedSubstrings.clear();
1007 Selector.canonicalizedValues.clear(); 1009 Selector.canonicalizedValues.clear();
1008 TypedSelector.canonicalizedValues.clear(); 1010 TypedSelector.canonicalizedValues.clear();
1009 1011
1010 assert(uri != null || analyzeOnly); 1012 assert(uri != null || analyzeOnly);
1011 return scanBuiltinLibraries().then((_) { 1013 return scanBuiltinLibraries().then((_) {
1012 if (librariesToAnalyzeWhenRun != null) { 1014 if (librariesToAnalyzeWhenRun != null) {
1013 return Future.forEach(librariesToAnalyzeWhenRun, (libraryUri) { 1015 return Future.forEach(librariesToAnalyzeWhenRun, (libraryUri) {
1014 log('analyzing $libraryUri ($buildId)'); 1016 log('Analyzing $libraryUri ($buildId)');
1015 return libraryLoader.loadLibrary(libraryUri, null, libraryUri); 1017 return libraryLoader.loadLibrary(libraryUri, null, libraryUri);
1016 }); 1018 });
1017 } 1019 }
1018 }).then((_) { 1020 }).then((_) {
1019 if (uri != null) { 1021 if (uri != null) {
1020 if (analyzeOnly) { 1022 if (analyzeOnly) {
1021 log('analyzing $uri ($buildId)'); 1023 log('Analyzing $uri ($buildId)');
1022 } else { 1024 } else {
1023 log('compiling $uri ($buildId)'); 1025 log('Compiling $uri ($buildId)');
1024 } 1026 }
1025 return libraryLoader.loadLibrary(uri, null, uri) 1027 return libraryLoader.loadLibrary(uri, null, uri)
1026 .then((LibraryElement library) { 1028 .then((LibraryElement library) {
1027 mainApp = library; 1029 mainApp = library;
1028 }); 1030 });
1029 } 1031 }
1030 }).then((_) { 1032 }).then((_) {
1031 compileLoadedLibraries(); 1033 compileLoadedLibraries();
1032 }); 1034 });
1033 } 1035 }
(...skipping 719 matching lines...) Expand 10 before | Expand all | Expand 10 after
1753 1755
1754 void close() {} 1756 void close() {}
1755 1757
1756 toString() => name; 1758 toString() => name;
1757 1759
1758 /// Convenience method for getting an [api.CompilerOutputProvider]. 1760 /// Convenience method for getting an [api.CompilerOutputProvider].
1759 static NullSink outputProvider(String name, String extension) { 1761 static NullSink outputProvider(String name, String extension) {
1760 return new NullSink('$name.$extension'); 1762 return new NullSink('$name.$extension');
1761 } 1763 }
1762 } 1764 }
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698