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

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

Issue 1435853002: Register closures using StaticUse. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Updated cf. comment Created 5 years, 1 month 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 | « pkg/compiler/lib/src/universe/universe.dart ('k') | pkg/compiler/lib/src/universe/world_impact.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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 deee3a26c2c0f4ed804dbc9a604c2710f5905cdc..b619d5a9672cb026bf41c8e1a3912d5db512e729 100644
--- a/pkg/compiler/lib/src/universe/use.dart
+++ b/pkg/compiler/lib/src/universe/use.dart
@@ -72,6 +72,7 @@ enum StaticUseKind {
SUPER_TEAR_OFF,
FIELD_GET,
FIELD_SET,
+ CLOSURE,
}
/// Statically known use of an [Element].
@@ -232,6 +233,11 @@ class StaticUse {
return new StaticUse._(element, StaticUseKind.FIELD_SET);
}
+ /// Read of a local function [element].
+ factory StaticUse.closure(LocalFunctionElement element) {
+ return new StaticUse._(element, StaticUseKind.CLOSURE);
+ }
+
/// Unknown use of [element].
@deprecated
factory StaticUse.foreignUse(Element element) {
« no previous file with comments | « pkg/compiler/lib/src/universe/universe.dart ('k') | pkg/compiler/lib/src/universe/world_impact.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698