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

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

Issue 1053673004: Handle local get through semantic visitor methods. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 5 years, 8 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
« no previous file with comments | « no previous file | pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/inferrer/concrete_types_inferrer.dart
diff --git a/pkg/compiler/lib/src/inferrer/concrete_types_inferrer.dart b/pkg/compiler/lib/src/inferrer/concrete_types_inferrer.dart
index 5247fe36ffd56c2aaab0b00cd11f81147c6a41d2..2a726ff69370ebeab8a26a6eed34bd6df5dfb305 100644
--- a/pkg/compiler/lib/src/inferrer/concrete_types_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/concrete_types_inferrer.dart
@@ -2376,12 +2376,20 @@ class TypeInferrerVisitor extends SimpleTypeInferrerVisitor<ConcreteType> {
if (inferrer.testMode) {
var element = elements[node];
if (element is Local) {
- ConcreteType type = locals.use(element);
- if (type != null) {
- inferrer.augmentInferredType(node, type);
- }
+ internalError(node, "Unhandled local: $element");
}
}
return super.visitGetterSend(node);
}
+
+ @override
+ ConcreteType handleLocalGet(Send node, LocalElement local) {
+ if (inferrer.testMode) {
+ ConcreteType type = locals.use(local);
+ if (type != null) {
+ inferrer.augmentInferredType(node, type);
+ }
+ }
+ return super.handleLocalGet(node, local);
+ }
}
« no previous file with comments | « no previous file | pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698