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

Unified Diff: pkg/compiler/lib/src/js_backend/codegen_listener.dart

Issue 2729613004: Cleanup registration of closures (Closed)
Patch Set: Updated cf. comments. Created 3 years, 9 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
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/js_backend/enqueuer.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: pkg/compiler/lib/src/js_backend/codegen_listener.dart
diff --git a/pkg/compiler/lib/src/js_backend/codegen_listener.dart b/pkg/compiler/lib/src/js_backend/codegen_listener.dart
index e2a438870b27f7506dd600c7c438b133e0027745..30f1ddc6ed9ea9ccd50fd3c40e30446a2234f9a4 100644
--- a/pkg/compiler/lib/src/js_backend/codegen_listener.dart
+++ b/pkg/compiler/lib/src/js_backend/codegen_listener.dart
@@ -60,8 +60,15 @@ class CodegenEnqueuerListener extends EnqueuerListener {
BackendUsage get _backendUsage => _backend.backendUsage;
@override
- WorldImpact registerBoundClosure() {
- return _impacts.memberClosure.createImpact(_elementEnvironment);
+ WorldImpact registerClosurizedMember(MemberElement element) {
+ WorldImpactBuilderImpl impactBuilder = new WorldImpactBuilderImpl();
+ impactBuilder
+ .addImpact(_impacts.memberClosure.createImpact(_elementEnvironment));
+ if (element.type.containsTypeVariables &&
+ _rtiNeed.methodNeedsRti(element)) {
+ impactBuilder.addImpact(_registerComputeSignature());
+ }
+ return impactBuilder;
}
@override
@@ -177,13 +184,6 @@ class CodegenEnqueuerListener extends EnqueuerListener {
return worldImpact;
}
- WorldImpact registerClosureWithFreeTypeVariables(MethodElement closure) {
- if (_rtiNeed.methodNeedsRti(closure)) {
- return _registerComputeSignature();
- }
- return const WorldImpact();
- }
-
WorldImpact _processClass(ClassElement cls) {
WorldImpactBuilderImpl impactBuilder = new WorldImpactBuilderImpl();
if (!cls.typeVariables.isEmpty) {
« no previous file with comments | « pkg/compiler/lib/src/js_backend/backend.dart ('k') | pkg/compiler/lib/src/js_backend/enqueuer.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698