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

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

Issue 2981613002: Parameterize TypeSystem by its node kind (Closed)
Patch Set: Updated cf. comments Created 3 years, 5 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/inferrer_engine.dart
diff --git a/pkg/compiler/lib/src/inferrer/inferrer_engine.dart b/pkg/compiler/lib/src/inferrer/inferrer_engine.dart
index c98f268c57bffa2597553ec8ab4c2c59d8f50542..c7d8995a26519ff4c6515611b9ba0f94b2ceff92 100644
--- a/pkg/compiler/lib/src/inferrer/inferrer_engine.dart
+++ b/pkg/compiler/lib/src/inferrer/inferrer_engine.dart
@@ -63,7 +63,7 @@ class InferrerEngine {
final ClosedWorld closedWorld;
final ClosedWorldRefiner closedWorldRefiner;
- final TypeSystem types;
+ final TypeSystem<ast.Node> types;
final Map<ast.Node, TypeInformation> concreteTypes =
new Map<ast.Node, TypeInformation>();
@@ -82,7 +82,7 @@ class InferrerEngine {
InferrerEngine(this.compiler, ClosedWorld closedWorld,
this.closedWorldRefiner, this.mainElement)
- : this.types = new TypeSystem(closedWorld),
+ : this.types = new TypeSystem<ast.Node>(closedWorld),
this.closedWorld = closedWorld;
CommonElements get commonElements => closedWorld.commonElements;
@@ -947,7 +947,7 @@ class InferrerEngine {
*/
TypeInformation registerAwait(ast.Node node, TypeInformation argument) {
AwaitTypeInformation info =
- new AwaitTypeInformation(types.currentMember, node);
+ new AwaitTypeInformation<ast.Node>(types.currentMember, node);
info.addAssignment(argument);
types.allocatedTypes.add(info);
return info;
@@ -959,7 +959,7 @@ class InferrerEngine {
*/
TypeInformation registerYield(ast.Node node, TypeInformation argument) {
YieldTypeInformation info =
- new YieldTypeInformation(types.currentMember, node);
+ new YieldTypeInformation<ast.Node>(types.currentMember, node);
info.addAssignment(argument);
types.allocatedTypes.add(info);
return info;
« no previous file with comments | « pkg/compiler/lib/src/inferrer/builder_kernel.dart ('k') | pkg/compiler/lib/src/inferrer/locals_handler.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698