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

Unified Diff: pkg/compiler/lib/src/universe/use.dart

Issue 2992863002: Support forEachClassMember on closure classes (Closed)
Patch Set: Updated cf. comments Created 3 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
Index: pkg/compiler/lib/src/universe/use.dart
diff --git a/pkg/compiler/lib/src/universe/use.dart b/pkg/compiler/lib/src/universe/use.dart
index 8c899c06cdd865c802df66c0fb05cc2ff046eb3b..124f1815194b36a462133e030d03a1267355952b 100644
--- a/pkg/compiler/lib/src/universe/use.dart
+++ b/pkg/compiler/lib/src/universe/use.dart
@@ -77,6 +77,7 @@ enum StaticUseKind {
FIELD_GET,
FIELD_SET,
CLOSURE,
+ CALL_METHOD,
CONSTRUCTOR_INVOKE,
CONST_CONSTRUCTOR_INVOKE,
REDIRECTION,
@@ -377,6 +378,11 @@ class StaticUse {
return new StaticUse.internal(element, StaticUseKind.CLOSURE);
}
+ /// Read of a call [method] on a closureClass.
+ factory StaticUse.callMethod(FunctionEntity method) {
+ return new StaticUse.internal(method, StaticUseKind.CALL_METHOD);
+ }
+
/// Use of [element] through reflection.
factory StaticUse.mirrorUse(MemberEntity element) {
return new StaticUse.internal(element, StaticUseKind.GENERAL);

Powered by Google App Engine
This is Rietveld 408576698