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

Unified Diff: lib/compiler/implementation/tree/nodes.dart

Issue 10915054: Mark the local for this as used if a constructor call needs type variables. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 years, 3 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: lib/compiler/implementation/tree/nodes.dart
diff --git a/lib/compiler/implementation/tree/nodes.dart b/lib/compiler/implementation/tree/nodes.dart
index 7fd2edc2f94d53524b1c36c5a86166b7582235ad..307b72a9f8b66b32b5e4597cf829b666dce0cddd 100644
--- a/lib/compiler/implementation/tree/nodes.dart
+++ b/lib/compiler/implementation/tree/nodes.dart
@@ -305,6 +305,22 @@ class Send extends Expression {
assert(receiver === null);
return new Send(newReceiver, selector, argumentsNode);
}
+
+ /**
+ * Returns the type annotation of a connstructor call in an object
+ * instantiation.
+ */
+ TypeAnnotation getTypeAnnotation() {
+ if (selector is TypeAnnotation) {
+ return selector;
+ } else if (selector is Send) {
+ Send selectorSend = selector;
+ if (selectorSend.receiver is TypeAnnotation) {
+ return selectorSend.receiver;
+ }
+ }
+ return null;
+ }
}
class Postfix extends NodeList {
« lib/compiler/implementation/ssa/builder.dart ('K') | « lib/compiler/implementation/ssa/builder.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698