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

Unified Diff: pkg/compiler/lib/src/enqueue.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/deferred_load.dart ('k') | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/enqueue.dart
diff --git a/pkg/compiler/lib/src/enqueue.dart b/pkg/compiler/lib/src/enqueue.dart
index 878898901aba49ba6a578f5d85432b67fa733d21..2fef15ca51747063da26d524ccd0679786aa8824 100644
--- a/pkg/compiler/lib/src/enqueue.dart
+++ b/pkg/compiler/lib/src/enqueue.dart
@@ -170,7 +170,6 @@ abstract class Enqueuer {
worldImpact.dynamicUses.forEach(registerDynamicUse);
worldImpact.staticUses.forEach(registerStaticUse);
worldImpact.typeUses.forEach(registerTypeUse);
- worldImpact.closures.forEach(registerClosure);
}
void registerInstantiatedType(InterfaceType type,
@@ -628,8 +627,11 @@ abstract class Enqueuer {
break;
case StaticUseKind.FIELD_GET:
case StaticUseKind.FIELD_SET:
+ case StaticUseKind.CLOSURE:
// TODO(johnniwinther): Avoid this. Currently [FIELD_GET] and
// [FIELD_SET] contains [BoxFieldElement]s which we cannot enqueue.
+ // Also [CLOSURE] contains [LocalFunctionElement] which we cannot
+ // enqueue.
addElement = false;
break;
case StaticUseKind.SUPER_TEAR_OFF:
@@ -688,10 +690,6 @@ abstract class Enqueuer {
universe.closurizedMembers.add(element);
}
- void registerClosure(LocalFunctionElement element) {
- universe.allClosures.add(element);
- }
-
void forEach(void f(WorkItem work)) {
do {
while (queue.isNotEmpty) {
« no previous file with comments | « pkg/compiler/lib/src/deferred_load.dart ('k') | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698