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

Side by Side Diff: pkg/compiler/lib/src/js_backend/impact_transformer.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 unified diff | Download patch
OLDNEW
1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2017, the Dart project authors. Please see the AUTHORS file
2 // for details. All rights reserved. Use of this source code is governed by a 2 // for details. All rights reserved. Use of this source code is governed by a
3 // BSD-style license that can be found in the LICENSE file. 3 // BSD-style license that can be found in the LICENSE file.
4 4
5 library js_backend.backend.impact_transformer; 5 library js_backend.backend.impact_transformer;
6 6
7 import '../common.dart'; 7 import '../common.dart';
8 import '../common/backend_api.dart' show ImpactTransformer; 8 import '../common/backend_api.dart' show ImpactTransformer;
9 import '../common/codegen.dart' show CodegenImpact; 9 import '../common/codegen.dart' show CodegenImpact;
10 import '../common/resolution.dart' show ResolutionImpact; 10 import '../common/resolution.dart' show ResolutionImpact;
(...skipping 364 matching lines...) Expand 10 before | Expand all | Expand 10 after
375 375
376 for (Pair<ResolutionDartType, ResolutionDartType> check 376 for (Pair<ResolutionDartType, ResolutionDartType> check
377 in impact.typeVariableBoundsSubtypeChecks) { 377 in impact.typeVariableBoundsSubtypeChecks) {
378 backend.registerTypeVariableBoundsSubtypeCheck(check.a, check.b); 378 backend.registerTypeVariableBoundsSubtypeCheck(check.a, check.b);
379 } 379 }
380 380
381 for (StaticUse staticUse in impact.staticUses) { 381 for (StaticUse staticUse in impact.staticUses) {
382 switch (staticUse.kind) { 382 switch (staticUse.kind) {
383 case StaticUseKind.CLOSURE: 383 case StaticUseKind.CLOSURE:
384 LocalFunctionElement closure = staticUse.element; 384 LocalFunctionElement closure = staticUse.element;
385 if (backend.rtiNeed.methodNeedsRti(closure)) { 385 if (backend.rtiNeed.localFunctionNeedsRti(closure)) {
386 impacts.computeSignature 386 impacts.computeSignature
387 .registerImpact(transformed, elementEnvironment); 387 .registerImpact(transformed, elementEnvironment);
388 } 388 }
389 break; 389 break;
390 case StaticUseKind.CONST_CONSTRUCTOR_INVOKE: 390 case StaticUseKind.CONST_CONSTRUCTOR_INVOKE:
391 case StaticUseKind.CONSTRUCTOR_INVOKE: 391 case StaticUseKind.CONSTRUCTOR_INVOKE:
392 backend.lookupMapAnalysis.registerInstantiatedType(staticUse.type); 392 backend.lookupMapAnalysis.registerInstantiatedType(staticUse.type);
393 break; 393 break;
394 default: 394 default:
395 } 395 }
(...skipping 30 matching lines...) Expand all
426 case AsyncMarker.ASYNC_STAR: 426 case AsyncMarker.ASYNC_STAR:
427 impacts.asyncStarBody.registerImpact(transformed, elementEnvironment); 427 impacts.asyncStarBody.registerImpact(transformed, elementEnvironment);
428 break; 428 break;
429 } 429 }
430 } 430 }
431 431
432 // TODO(johnniwinther): Remove eager registration. 432 // TODO(johnniwinther): Remove eager registration.
433 return transformed; 433 return transformed;
434 } 434 }
435 } 435 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/js_backend/enqueuer.dart ('k') | pkg/compiler/lib/src/js_backend/mirrors_data.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698