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 '../dart_types.dart'; | 9 import '../dart_types.dart'; |
10 import '../elements/elements.dart'; | 10 import '../elements/elements.dart'; |
(...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
109 this.constantLiterals: const <ConstantExpression>[], | 109 this.constantLiterals: const <ConstantExpression>[], |
110 this.dynamicUses: const <DynamicUse>[], | 110 this.dynamicUses: const <DynamicUse>[], |
111 EnumSet<Feature> features, | 111 EnumSet<Feature> features, |
112 this.listLiterals: const <ListLiteralUse>[], | 112 this.listLiterals: const <ListLiteralUse>[], |
113 this.mapLiterals: const <MapLiteralUse>[], | 113 this.mapLiterals: const <MapLiteralUse>[], |
114 this.staticUses: const <StaticUse>[], | 114 this.staticUses: const <StaticUse>[], |
115 this.typeUses: const <TypeUse>[], | 115 this.typeUses: const <TypeUse>[], |
116 this.nativeData: const <dynamic>[]}) | 116 this.nativeData: const <dynamic>[]}) |
117 : this._features = features; | 117 : this._features = features; |
118 | 118 |
| 119 @override |
| 120 bool get isEmpty => false; |
| 121 |
119 Iterable<Feature> get features { | 122 Iterable<Feature> get features { |
120 return _features != null | 123 return _features != null |
121 ? _features.iterable(Feature.values) | 124 ? _features.iterable(Feature.values) |
122 : const <Feature>[]; | 125 : const <Feature>[]; |
123 } | 126 } |
124 } | 127 } |
125 | 128 |
126 class ImpactDeserializer { | 129 class ImpactDeserializer { |
127 /// Deserializes a [WorldImpact] from [objectDecoder]. | 130 /// Deserializes a [WorldImpact] from [objectDecoder]. |
128 static ResolutionImpact deserializeImpact(Element element, | 131 static ResolutionImpact deserializeImpact(Element element, |
(...skipping 84 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
213 constantLiterals: constantLiterals, | 216 constantLiterals: constantLiterals, |
214 dynamicUses: dynamicUses, | 217 dynamicUses: dynamicUses, |
215 features: features, | 218 features: features, |
216 listLiterals: listLiterals, | 219 listLiterals: listLiterals, |
217 mapLiterals: mapLiterals, | 220 mapLiterals: mapLiterals, |
218 staticUses: staticUses, | 221 staticUses: staticUses, |
219 typeUses: typeUses, | 222 typeUses: typeUses, |
220 nativeData: nativeData); | 223 nativeData: nativeData); |
221 } | 224 } |
222 } | 225 } |
OLD | NEW |