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

Unified Diff: pkg/compiler/lib/src/enqueue.dart

Issue 2729613004: Cleanup registration of closures (Closed)
Patch Set: Created 3 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
Index: pkg/compiler/lib/src/enqueue.dart
diff --git a/pkg/compiler/lib/src/enqueue.dart b/pkg/compiler/lib/src/enqueue.dart
index 2097b561752820081152f5fb3ddbafdb312c578b..42c947ce58a005ade936ce7bf83a423b02470007 100644
--- a/pkg/compiler/lib/src/enqueue.dart
+++ b/pkg/compiler/lib/src/enqueue.dart
@@ -113,14 +113,9 @@ abstract class EnqueuerListener {
/// specific [WorldImpact] of this is returned.
WorldImpact registerGetOfStaticFunction();
- /// Called to instruct the backend to register that a closure exists for a
- /// function on an instantiated generic class. Any backend specific
- /// [WorldImpact] of this is returned.
- WorldImpact registerClosureWithFreeTypeVariables(MemberEntity member);
-
/// Called to register that a member has been closurized. Any backend specific
Siggi Cherem (dart-lang) 2017/03/14 03:02:34 a member => [member]
Johnni Winther 2017/03/14 16:59:46 Done.
/// [WorldImpact] of this is returned.
- WorldImpact registerBoundClosure();
+ WorldImpact registerClosurizedMember(MemberEntity member);
/// Called to register that [element] is statically known to be used. Any
/// backend specific [WorldImpact] of this is returned.
@@ -368,11 +363,7 @@ class ResolutionEnqueuer extends EnqueuerImpl {
void _registerClosurizedMember(MemberElement element) {
assert(element.isInstanceMember);
- if (element.type.containsTypeVariables) {
- applyImpact(listener.registerClosureWithFreeTypeVariables(element));
- _worldBuilder.registerClosureWithFreeTypeVariables(element);
- }
- applyImpact(listener.registerBoundClosure());
+ applyImpact(listener.registerClosurizedMember(element));
_worldBuilder.registerClosurizedMember(element);
}

Powered by Google App Engine
This is Rietveld 408576698