OLD | NEW |
1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, 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; | 5 library js_backend.backend; |
6 | 6 |
7 import 'dart:async' show Future; | 7 import 'dart:async' show Future; |
8 | 8 |
9 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; | 9 import 'package:js_runtime/shared/embedded_names.dart' as embeddedNames; |
10 | 10 |
(...skipping 2802 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2813 break; | 2813 break; |
2814 case Feature.COMPILE_TIME_ERROR: | 2814 case Feature.COMPILE_TIME_ERROR: |
2815 if (backend.compiler.options.generateCodeWithCompileTimeErrors) { | 2815 if (backend.compiler.options.generateCodeWithCompileTimeErrors) { |
2816 // TODO(johnniwinther): This should have its own uncatchable error. | 2816 // TODO(johnniwinther): This should have its own uncatchable error. |
2817 registerBackendImpact(transformed, impacts.throwRuntimeError); | 2817 registerBackendImpact(transformed, impacts.throwRuntimeError); |
2818 } | 2818 } |
2819 break; | 2819 break; |
2820 case Feature.FALL_THROUGH_ERROR: | 2820 case Feature.FALL_THROUGH_ERROR: |
2821 registerBackendImpact(transformed, impacts.fallThroughError); | 2821 registerBackendImpact(transformed, impacts.fallThroughError); |
2822 break; | 2822 break; |
| 2823 case Feature.FIELD_WITHOUT_INITIALIZER: |
| 2824 transformed.registerTypeUse( |
| 2825 new TypeUse.instantiation(backend.coreTypes.nullType)); |
| 2826 registerBackendImpact(transformed, impacts.nullLiteral); |
| 2827 break; |
2823 case Feature.INC_DEC_OPERATION: | 2828 case Feature.INC_DEC_OPERATION: |
2824 registerBackendImpact(transformed, impacts.incDecOperation); | 2829 registerBackendImpact(transformed, impacts.incDecOperation); |
2825 break; | 2830 break; |
2826 case Feature.LAZY_FIELD: | 2831 case Feature.LAZY_FIELD: |
2827 registerBackendImpact(transformed, impacts.lazyField); | 2832 registerBackendImpact(transformed, impacts.lazyField); |
2828 break; | 2833 break; |
2829 case Feature.STACK_TRACE_IN_CATCH: | 2834 case Feature.STACK_TRACE_IN_CATCH: |
2830 registerBackendImpact(transformed, impacts.stackTraceInCatch); | 2835 registerBackendImpact(transformed, impacts.stackTraceInCatch); |
2831 break; | 2836 break; |
2832 case Feature.STRING_INTERPOLATION: | 2837 case Feature.STRING_INTERPOLATION: |
(...skipping 381 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3214 | 3219 |
3215 @override | 3220 @override |
3216 void onImpactUsed(ImpactUseCase impactUse) { | 3221 void onImpactUsed(ImpactUseCase impactUse) { |
3217 if (impactUse == DeferredLoadTask.IMPACT_USE && !supportSerialization) { | 3222 if (impactUse == DeferredLoadTask.IMPACT_USE && !supportSerialization) { |
3218 // TODO(johnniwinther): Allow emptying when serialization has been | 3223 // TODO(johnniwinther): Allow emptying when serialization has been |
3219 // performed. | 3224 // performed. |
3220 resolution.emptyCache(); | 3225 resolution.emptyCache(); |
3221 } | 3226 } |
3222 } | 3227 } |
3223 } | 3228 } |
OLD | NEW |