| 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_elements.dart'; | 8 import '../common_elements.dart'; |
| 9 import '../common/backend_api.dart' show ImpactTransformer; | 9 import '../common/backend_api.dart' show ImpactTransformer; |
| 10 import '../common/codegen.dart' show CodegenImpact; | 10 import '../common/codegen.dart' show CodegenImpact; |
| (...skipping 121 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 132 break; | 132 break; |
| 133 case Feature.THROW_EXPRESSION: | 133 case Feature.THROW_EXPRESSION: |
| 134 registerImpact(_impacts.throwExpression); | 134 registerImpact(_impacts.throwExpression); |
| 135 break; | 135 break; |
| 136 case Feature.THROW_NO_SUCH_METHOD: | 136 case Feature.THROW_NO_SUCH_METHOD: |
| 137 registerImpact(_impacts.throwNoSuchMethod); | 137 registerImpact(_impacts.throwNoSuchMethod); |
| 138 break; | 138 break; |
| 139 case Feature.THROW_RUNTIME_ERROR: | 139 case Feature.THROW_RUNTIME_ERROR: |
| 140 registerImpact(_impacts.throwRuntimeError); | 140 registerImpact(_impacts.throwRuntimeError); |
| 141 break; | 141 break; |
| 142 case Feature.THROW_UNSUPPORTED_ERROR: |
| 143 registerImpact(_impacts.throwUnsupportedError); |
| 144 break; |
| 142 case Feature.TYPE_VARIABLE_BOUNDS_CHECK: | 145 case Feature.TYPE_VARIABLE_BOUNDS_CHECK: |
| 143 registerImpact(_impacts.typeVariableBoundCheck); | 146 registerImpact(_impacts.typeVariableBoundCheck); |
| 144 break; | 147 break; |
| 145 } | 148 } |
| 146 } | 149 } |
| 147 | 150 |
| 148 bool hasAsCast = false; | 151 bool hasAsCast = false; |
| 149 bool hasTypeLiteral = false; | 152 bool hasTypeLiteral = false; |
| 150 for (TypeUse typeUse in worldImpact.typeUses) { | 153 for (TypeUse typeUse in worldImpact.typeUses) { |
| 151 DartType type = typeUse.type; | 154 DartType type = typeUse.type; |
| (...skipping 315 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 467 _impacts.asyncStarBody | 470 _impacts.asyncStarBody |
| 468 .registerImpact(transformed, _elementEnvironment); | 471 .registerImpact(transformed, _elementEnvironment); |
| 469 break; | 472 break; |
| 470 } | 473 } |
| 471 } | 474 } |
| 472 | 475 |
| 473 // TODO(johnniwinther): Remove eager registration. | 476 // TODO(johnniwinther): Remove eager registration. |
| 474 return transformed; | 477 return transformed; |
| 475 } | 478 } |
| 476 } | 479 } |
| OLD | NEW |