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

Unified Diff: frog/leg/elements/elements.dart

Issue 9359011: Capture this. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Make this-capture work in the context of constructors. Created 8 years, 10 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 | frog/leg/ssa/builder.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: frog/leg/elements/elements.dart
diff --git a/frog/leg/elements/elements.dart b/frog/leg/elements/elements.dart
index af1c075b79be5d364797992a203d8d5c2834cb74..f39d2457d8771d8bb38585ba63fd171751bd1637 100644
--- a/frog/leg/elements/elements.dart
+++ b/frog/leg/elements/elements.dart
@@ -644,6 +644,12 @@ class Elements {
&& (element.kind === ElementKind.FUNCTION);
}
+ static bool isInstanceSend(Send send, TreeElements elements) {
+ Element element = elements[send];
+ if (element === null) return !isClosureSend(send, elements);
+ return isInstanceMethod(element) || isInstanceField(element);
+ }
+
static bool isClosureSend(Send send, TreeElements elements) {
if (send.isPropertyAccess) return false;
if (send.receiver !== null) return false;
« no previous file with comments | « no previous file | frog/leg/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698