| OLD | NEW |
| 1 // Copyright (c) 2016, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2016, 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 dart2js.serialization.impact; | 5 library dart2js.serialization.impact; |
| 6 | 6 |
| 7 import '../common/resolution.dart'; | 7 import '../common/resolution.dart'; |
| 8 import '../constants/expressions.dart'; | 8 import '../constants/expressions.dart'; |
| 9 import '../elements/resolution_types.dart'; | 9 import '../elements/resolution_types.dart'; |
| 10 import '../elements/elements.dart'; | 10 import '../elements/elements.dart'; |
| (...skipping 73 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 84 object.setType(Key.TYPE, staticUse.type); | 84 object.setType(Key.TYPE, staticUse.type); |
| 85 } | 85 } |
| 86 } | 86 } |
| 87 | 87 |
| 88 @override | 88 @override |
| 89 void visitTypeUse(TypeUse typeUse) { | 89 void visitTypeUse(TypeUse typeUse) { |
| 90 ObjectEncoder object = typeUses.createObject(); | 90 ObjectEncoder object = typeUses.createObject(); |
| 91 object.setEnum(Key.KIND, typeUse.kind); | 91 object.setEnum(Key.KIND, typeUse.kind); |
| 92 object.setType(Key.TYPE, typeUse.type); | 92 object.setType(Key.TYPE, typeUse.type); |
| 93 } | 93 } |
| 94 |
| 95 @override |
| 96 void visitConstantUse(ConstantUse typeUse) { |
| 97 throw new UnsupportedError("ConstantUse serialization is not supported."); |
| 98 } |
| 94 } | 99 } |
| 95 | 100 |
| 96 /// A deserialized [WorldImpact] object. | 101 /// A deserialized [WorldImpact] object. |
| 97 class DeserializedResolutionImpact extends WorldImpact | 102 class DeserializedResolutionImpact extends WorldImpact |
| 98 implements ResolutionImpact { | 103 implements ResolutionImpact { |
| 99 final Iterable<String> constSymbolNames; | 104 final Iterable<String> constSymbolNames; |
| 100 final Iterable<ConstantExpression> constantLiterals; | 105 final Iterable<ConstantExpression> constantLiterals; |
| 101 final Iterable<DynamicUse> dynamicUses; | 106 final Iterable<DynamicUse> dynamicUses; |
| 102 final EnumSet<Feature> _features; | 107 final EnumSet<Feature> _features; |
| 103 final Iterable<ListLiteralUse> listLiterals; | 108 final Iterable<ListLiteralUse> listLiterals; |
| (...skipping 114 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 218 constantLiterals: constantLiterals, | 223 constantLiterals: constantLiterals, |
| 219 dynamicUses: dynamicUses, | 224 dynamicUses: dynamicUses, |
| 220 features: features, | 225 features: features, |
| 221 listLiterals: listLiterals, | 226 listLiterals: listLiterals, |
| 222 mapLiterals: mapLiterals, | 227 mapLiterals: mapLiterals, |
| 223 staticUses: staticUses, | 228 staticUses: staticUses, |
| 224 typeUses: typeUses, | 229 typeUses: typeUses, |
| 225 nativeData: nativeData); | 230 nativeData: nativeData); |
| 226 } | 231 } |
| 227 } | 232 } |
| OLD | NEW |