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

Unified Diff: pkg/compiler/lib/src/inferrer/type_graph_nodes.dart

Issue 1013803006: Abort tracing in type inference in the presence of await. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: added test Created 5 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 side-by-side diff with in-line comments
Download patch
Index: pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
diff --git a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
index 6a9610dd3a04fe90f936cc68af39cbb1fd851451..7b673d028cdb8f6ab340e9e680cdda66cf7350a4 100644
--- a/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
+++ b/pkg/compiler/lib/src/inferrer/type_graph_nodes.dart
@@ -1518,6 +1518,22 @@ abstract class TracedTypeInformation implements TypeInformation {
}
}
+class AwaitTypeInformation extends TypeInformation {
+ final ast.Node node;
+
+ AwaitTypeInformation(MemberTypeInformation context, this.node)
+ : super(context);
+
+ // TODO(22894): Compute a better type here.
+ TypeMask computeType(TypeGraphInferrerEngine inferrer) => safeType(inferrer);
+
+ String toString() => 'Await';
+
+ accept(TypeInformationVisitor visitor) {
+ return visitor.visitAwaitTypeInformation(this);
+ }
+}
+
abstract class TypeInformationVisitor<T> {
T visitNarrowTypeInformation(NarrowTypeInformation info);
T visitPhiElementTypeInformation(PhiElementTypeInformation info);
@@ -1535,4 +1551,5 @@ abstract class TypeInformationVisitor<T> {
T visitMemberTypeInformation(MemberTypeInformation info);
T visitParameterTypeInformation(ParameterTypeInformation info);
T visitClosureTypeInformation(ClosureTypeInformation info);
+ T visitAwaitTypeInformation(AwaitTypeInformation info);
}
« no previous file with comments | « pkg/compiler/lib/src/inferrer/type_graph_inferrer.dart ('k') | tests/compiler/dart2js_extra/22868_test.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698