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

Unified Diff: pkg/compiler/lib/src/inferrer/type_graph_inferrer.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
Index: pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart b/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
index 576e632b5725654d345d232e4498e9beac88a9e2..4a03bafed62e2f1b15f56ab4ae039827043fb166 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart
@@ -233,6 +233,27 @@ class TypeInformationSystem extends TypeSystem<TypeInformation> {
getConcreteTypeFor(compiler.typesTask.dynamicType);
}
+ TypeInformation asyncFutureTypeCache;
+ TypeInformation get asyncFutureType {
+ if (asyncFutureTypeCache != null) return asyncFutureTypeCache;
+ return asyncFutureTypeCache =
+ getConcreteTypeFor(compiler.typesTask.asyncFutureType);
+ }
+
+ TypeInformation syncStarIterableTypeCache;
+ TypeInformation get syncStarIterableType {
+ if (syncStarIterableTypeCache != null) return syncStarIterableTypeCache;
+ return syncStarIterableTypeCache =
+ getConcreteTypeFor(compiler.typesTask.syncStarIterableType);
+ }
+
+ TypeInformation asyncStarStreamTypeCache;
+ TypeInformation get asyncStarStreamType {
+ if (asyncStarStreamTypeCache != null) return asyncStarStreamTypeCache;
+ return asyncStarStreamTypeCache =
+ getConcreteTypeFor(compiler.typesTask.asyncStarStreamType);
+ }
+
TypeInformation nonNullEmptyType;
TypeInformation stringLiteralType(ast.DartString value) {
« no previous file with comments | « pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart ('k') | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698