OLD | NEW |
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 579 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
590 this.enableTypeAssertions: false, | 590 this.enableTypeAssertions: false, |
591 this.enableUserAssertions: false, | 591 this.enableUserAssertions: false, |
592 this.trustTypeAnnotations: false, | 592 this.trustTypeAnnotations: false, |
593 this.enableConcreteTypeInference: false, | 593 this.enableConcreteTypeInference: false, |
594 this.disableTypeInferenceFlag: false, | 594 this.disableTypeInferenceFlag: false, |
595 this.maxConcreteTypeSize: 5, | 595 this.maxConcreteTypeSize: 5, |
596 this.enableMinification: false, | 596 this.enableMinification: false, |
597 this.enableNativeLiveTypeAnalysis: false, | 597 this.enableNativeLiveTypeAnalysis: false, |
598 bool emitJavaScript: true, | 598 bool emitJavaScript: true, |
599 bool generateSourceMap: true, | 599 bool generateSourceMap: true, |
600 bool disallowUnsafeEval: false, | |
601 this.analyzeAllFlag: false, | 600 this.analyzeAllFlag: false, |
602 bool analyzeOnly: false, | 601 bool analyzeOnly: false, |
603 bool analyzeSignaturesOnly: false, | 602 bool analyzeSignaturesOnly: false, |
604 this.preserveComments: false, | 603 this.preserveComments: false, |
605 this.verbose: false, | 604 this.verbose: false, |
606 this.sourceMapUri: null, | 605 this.sourceMapUri: null, |
607 this.buildId: UNDETERMINED_BUILD_ID, | 606 this.buildId: UNDETERMINED_BUILD_ID, |
608 this.globalJsName: r'$', | 607 this.globalJsName: r'$', |
609 this.terseDiagnostics: false, | 608 this.terseDiagnostics: false, |
610 outputProvider, | 609 outputProvider, |
611 List<String> strips: const []}) | 610 List<String> strips: const []}) |
612 : this.analyzeOnly = analyzeOnly || analyzeSignaturesOnly, | 611 : this.analyzeOnly = analyzeOnly || analyzeSignaturesOnly, |
613 this.analyzeSignaturesOnly = analyzeSignaturesOnly, | 612 this.analyzeSignaturesOnly = analyzeSignaturesOnly, |
614 this.outputProvider = (outputProvider == null) | 613 this.outputProvider = (outputProvider == null) |
615 ? NullSink.outputProvider | 614 ? NullSink.outputProvider |
616 : outputProvider { | 615 : outputProvider { |
617 world = new World(this); | 616 world = new World(this); |
618 | 617 |
619 closureMapping.ClosureNamer closureNamer; | 618 closureMapping.ClosureNamer closureNamer; |
620 if (emitJavaScript) { | 619 if (emitJavaScript) { |
621 js_backend.JavaScriptBackend jsBackend = | 620 js_backend.JavaScriptBackend jsBackend = |
622 new js_backend.JavaScriptBackend(this, generateSourceMap, | 621 new js_backend.JavaScriptBackend(this, generateSourceMap); |
623 disallowUnsafeEval); | |
624 closureNamer = jsBackend.namer; | 622 closureNamer = jsBackend.namer; |
625 backend = jsBackend; | 623 backend = jsBackend; |
626 } else { | 624 } else { |
627 closureNamer = new closureMapping.ClosureNamer(); | 625 closureNamer = new closureMapping.ClosureNamer(); |
628 backend = new dart_backend.DartBackend(this, strips); | 626 backend = new dart_backend.DartBackend(this, strips); |
629 } | 627 } |
630 | 628 |
631 // No-op in production mode. | 629 // No-op in production mode. |
632 validator = new TreeValidatorTask(this); | 630 validator = new TreeValidatorTask(this); |
633 | 631 |
(...skipping 957 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1591 | 1589 |
1592 void close() {} | 1590 void close() {} |
1593 | 1591 |
1594 toString() => name; | 1592 toString() => name; |
1595 | 1593 |
1596 /// Convenience method for getting an [api.CompilerOutputProvider]. | 1594 /// Convenience method for getting an [api.CompilerOutputProvider]. |
1597 static NullSink outputProvider(String name, String extension) { | 1595 static NullSink outputProvider(String name, String extension) { |
1598 return new NullSink('$name.$extension'); | 1596 return new NullSink('$name.$extension'); |
1599 } | 1597 } |
1600 } | 1598 } |
OLD | NEW |