| OLD | NEW |
| 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 Loading... |
| 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 Loading... |
| 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 } |
| OLD | NEW |