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

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

Issue 1302313002: Deprecate visitStaticSend in ResolvedVisitor. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Cleanup Created 5 years, 4 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 | « pkg/compiler/lib/src/inferrer/inferrer_visitor.dart ('k') | pkg/compiler/lib/src/resolved_visitor.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
diff --git a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
index f57611275d20188fe3a6518e46af2dc27f8e3996..e77c6d1d215a6fef607912af5681b086c61afad2 100644
--- a/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
+++ b/pkg/compiler/lib/src/inferrer/simple_types_inferrer.dart
@@ -592,7 +592,17 @@ class SimpleTypeInferrerVisitor<T>
synthesizeForwardingCall(spannable, constructor.definingConstructor);
} else {
visitingInitializers = true;
- visit(node.initializers);
+ if (node.initializers != null) {
+ for (ast.Node initializer in node.initializers) {
+ ast.SendSet fieldInitializer = initializer.asSendSet();
+ if (fieldInitializer != null) {
+ handleSendSet(fieldInitializer);
+ } else {
+ Element element = elements[initializer];
+ handleConstructorSend(initializer, element);
+ }
+ }
+ }
visitingInitializers = false;
// For a generative constructor like: `Foo();`, we synthesize
// a call to the default super constructor (the one that takes
@@ -1583,12 +1593,6 @@ class SimpleTypeInferrerVisitor<T>
return super.handleTypeLiteralInvoke(arguments);
}
- T visitStaticSend(ast.Send node) {
- assert(!elements.isAssert(node));
- Element element = elements[node];
- return handleConstructorSend(node, element);
- }
-
/// Handle constructor invocation of [element].
T handleConstructorSend(ast.Send node, ConstructorElement element) {
ArgumentsTypes arguments = analyzeArguments(node.arguments);
@@ -1660,7 +1664,8 @@ class SimpleTypeInferrerVisitor<T>
}
T handleNewExpression(ast.NewExpression node) {
- return visitStaticSend(node.send);
+ Element element = elements[node.send];
+ return handleConstructorSend(node.send, element);
}
/// Handle invocation of a top level or static field or getter [element].
« no previous file with comments | « pkg/compiler/lib/src/inferrer/inferrer_visitor.dart ('k') | pkg/compiler/lib/src/resolved_visitor.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698