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

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

Issue 880973005: Support async/await in dart2dart. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Updated cf. comment + status for new_backend Created 5 years, 10 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 725 matching lines...) Expand 10 before | Expand all | Expand 10 after
736 736
737 /// Map containing information about the warnings and hints that have been 737 /// Map containing information about the warnings and hints that have been
738 /// suppressed for each library. 738 /// suppressed for each library.
739 Map<Uri, SuppressionInfo> suppressedWarnings = <Uri, SuppressionInfo>{}; 739 Map<Uri, SuppressionInfo> suppressedWarnings = <Uri, SuppressionInfo>{};
740 740
741 final bool suppressWarnings; 741 final bool suppressWarnings;
742 742
743 /// `true` if async/await features are supported. 743 /// `true` if async/await features are supported.
744 final bool enableAsyncAwait; 744 final bool enableAsyncAwait;
745 745
746 /// `true` if the compiler uses the [JavaScriptBackend].
747 final bool emitJavaScript;
748
746 /// If `true`, some values are cached for reuse in incremental compilation. 749 /// If `true`, some values are cached for reuse in incremental compilation.
747 /// Incremental compilation is basically calling [run] more than once. 750 /// Incremental compilation is basically calling [run] more than once.
748 final bool hasIncrementalSupport; 751 final bool hasIncrementalSupport;
749 752
750 /// If `true` native extension syntax is supported by the frontend. 753 /// If `true` native extension syntax is supported by the frontend.
751 final bool allowNativeExtensions; 754 final bool allowNativeExtensions;
752 755
753 /// Output provider from user of Compiler API. 756 /// Output provider from user of Compiler API.
754 api.CompilerOutputProvider userOutputProvider; 757 api.CompilerOutputProvider userOutputProvider;
755 758
(...skipping 241 matching lines...) Expand 10 before | Expand all | Expand 10 after
997 this.outputUri: null, 1000 this.outputUri: null,
998 this.buildId: UNDETERMINED_BUILD_ID, 1001 this.buildId: UNDETERMINED_BUILD_ID,
999 this.terseDiagnostics: false, 1002 this.terseDiagnostics: false,
1000 this.deferredMapUri: null, 1003 this.deferredMapUri: null,
1001 this.dumpInfo: false, 1004 this.dumpInfo: false,
1002 this.showPackageWarnings: false, 1005 this.showPackageWarnings: false,
1003 this.useContentSecurityPolicy: false, 1006 this.useContentSecurityPolicy: false,
1004 this.suppressWarnings: false, 1007 this.suppressWarnings: false,
1005 bool hasIncrementalSupport: false, 1008 bool hasIncrementalSupport: false,
1006 this.enableExperimentalMirrors: false, 1009 this.enableExperimentalMirrors: false,
1007 this.enableAsyncAwait: false, 1010 bool enableAsyncAwait: false,
1008 this.allowNativeExtensions: false, 1011 this.allowNativeExtensions: false,
1009 this.generateCodeWithCompileTimeErrors: false, 1012 this.generateCodeWithCompileTimeErrors: false,
1010 api.CompilerOutputProvider outputProvider, 1013 api.CompilerOutputProvider outputProvider,
1011 List<String> strips: const []}) 1014 List<String> strips: const []})
1012 : this.disableTypeInferenceFlag = 1015 : this.emitJavaScript = emitJavaScript,
1016 this.enableAsyncAwait = enableAsyncAwait || !emitJavaScript,
1017 this.disableTypeInferenceFlag =
1013 disableTypeInferenceFlag || !emitJavaScript, 1018 disableTypeInferenceFlag || !emitJavaScript,
1014 this.analyzeOnly = 1019 this.analyzeOnly =
1015 analyzeOnly || analyzeSignaturesOnly || analyzeAllFlag, 1020 analyzeOnly || analyzeSignaturesOnly || analyzeAllFlag,
1016 this.analyzeSignaturesOnly = analyzeSignaturesOnly, 1021 this.analyzeSignaturesOnly = analyzeSignaturesOnly,
1017 this.analyzeAllFlag = analyzeAllFlag, 1022 this.analyzeAllFlag = analyzeAllFlag,
1018 this.hasIncrementalSupport = hasIncrementalSupport, 1023 this.hasIncrementalSupport = hasIncrementalSupport,
1019 cacheStrategy = new CacheStrategy(hasIncrementalSupport), 1024 cacheStrategy = new CacheStrategy(hasIncrementalSupport),
1020 this.userOutputProvider = (outputProvider == null) 1025 this.userOutputProvider = (outputProvider == null)
1021 ? NullSink.outputProvider 1026 ? NullSink.outputProvider
1022 : outputProvider { 1027 : outputProvider {
(...skipping 1363 matching lines...) Expand 10 before | Expand all | Expand 10 after
2386 InterfaceType get nullType => nullClass.computeType(compiler); 2391 InterfaceType get nullType => nullClass.computeType(compiler);
2387 2392
2388 @override 2393 @override
2389 InterfaceType get numType => numClass.computeType(compiler); 2394 InterfaceType get numType => numClass.computeType(compiler);
2390 2395
2391 @override 2396 @override
2392 InterfaceType get stringType => stringClass.computeType(compiler); 2397 InterfaceType get stringType => stringClass.computeType(compiler);
2393 } 2398 }
2394 2399
2395 typedef void InternalErrorFunction(Spannable location, String message); 2400 typedef void InternalErrorFunction(Spannable location, String message);
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698