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

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: Addressed comments and fixed bug. 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') | frog/leg/ssa/closure.dart » ('J')
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 3b4f479e72ca8ea02dd46d31a25269c9cbc7e3b9..33a0604e0e81ee96418b9d997806ee3628d8d6c5 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') | frog/leg/ssa/closure.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698