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

Unified Diff: sdk/lib/_internal/compiler/implementation/inferrer/closure_tracer.dart

Issue 252693003: Allow a closure to be torn off from itself via .call. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 6 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
Index: sdk/lib/_internal/compiler/implementation/inferrer/closure_tracer.dart
diff --git a/sdk/lib/_internal/compiler/implementation/inferrer/closure_tracer.dart b/sdk/lib/_internal/compiler/implementation/inferrer/closure_tracer.dart
index 0814f6ef906b772ec09b1f9bdea0d1164814e048..94165da65be2e61f3f1a66d755f4fd115d84288c 100644
--- a/sdk/lib/_internal/compiler/implementation/inferrer/closure_tracer.dart
+++ b/sdk/lib/_internal/compiler/implementation/inferrer/closure_tracer.dart
@@ -79,6 +79,10 @@ class ClosureTracerVisitor extends TracerVisitor {
} else if (info.targets.any((element) => checkIfCurrentUser(element))) {
analyzeCall(info);
}
+ } else if (info.selector.isGetter() &&
+ info.selector.name == Compiler.CALL_OPERATOR_NAME) {
+ // We are potentially tearing off ourself here
+ addNewEscapeInformation(info);
}
}
}

Powered by Google App Engine
This is Rietveld 408576698