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

Unified Diff: pkg/compiler/lib/src/types/types.dart

Issue 1418043005: dart2js: Set inferred return types for async, async*, and sync* methods. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 1 month 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend_helpers.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/types/types.dart
diff --git a/pkg/compiler/lib/src/types/types.dart b/pkg/compiler/lib/src/types/types.dart
index 733d119f874ec197978646b2cd78667b0d08c08e..b8591aafc190d198021634e204178c1976c509cf 100644
--- a/pkg/compiler/lib/src/types/types.dart
+++ b/pkg/compiler/lib/src/types/types.dart
@@ -87,6 +87,9 @@ class TypesTask extends CompilerTask {
TypeMask constMapTypeCache;
TypeMask stringTypeCache;
TypeMask typeTypeCache;
+ TypeMask syncStarIterableTypeCache;
+ TypeMask asyncFutureTypeCache;
+ TypeMask asyncStarStreamTypeCache;
TypeMask get dynamicType {
if (dynamicTypeCache == null) {
@@ -232,6 +235,30 @@ class TypesTask extends CompilerTask {
return typeTypeCache;
}
+ TypeMask get syncStarIterableType {
+ if (syncStarIterableTypeCache == null) {
+ syncStarIterableTypeCache = new TypeMask.nonNullExact(
+ compiler.backend.syncStarIterableImplementation, compiler.world);
+ }
+ return syncStarIterableTypeCache;
+ }
+
+ TypeMask get asyncFutureType {
+ if (asyncFutureTypeCache == null) {
+ asyncFutureTypeCache = new TypeMask.nonNullExact(
+ compiler.backend.asyncFutureImplementation, compiler.world);
+ }
+ return asyncFutureTypeCache;
+ }
+
+ TypeMask get asyncStarStreamType {
+ if (asyncStarStreamTypeCache == null) {
+ asyncStarStreamTypeCache = new TypeMask.nonNullExact(
+ compiler.backend.asyncStarStreamImplementation, compiler.world);
+ }
+ return asyncStarStreamTypeCache;
+ }
+
TypeMask get nullType {
if (nullTypeCache == null) {
// TODO(johnniwinther): Assert that the null type has been resolved.
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend_helpers.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698