| 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 dart2js.backend_api; | 5 library dart2js.backend_api; |
| 6 | 6 |
| 7 import '../common/resolution.dart' show ResolutionImpact; | 7 import '../common/resolution.dart' show ResolutionImpact; |
| 8 import '../constants/expressions.dart' show ConstantExpression; | 8 import '../constants/expressions.dart' show ConstantExpression; |
| 9 import '../elements/types.dart'; | 9 import '../elements/types.dart'; |
| 10 import '../elements/resolution_types.dart' | 10 import '../elements/resolution_types.dart' |
| 11 show ResolutionDartType, ResolutionInterfaceType; | 11 show ResolutionDartType, ResolutionInterfaceType; |
| 12 import '../elements/entities.dart'; | 12 import '../elements/entities.dart'; |
| 13 import '../enqueue.dart' show ResolutionEnqueuer; | |
| 14 import '../serialization/serialization.dart' | 13 import '../serialization/serialization.dart' |
| 15 show DeserializerPlugin, SerializerPlugin; | 14 show DeserializerPlugin, SerializerPlugin; |
| 16 import '../tree/tree.dart' show Node; | 15 import '../tree/tree.dart' show Node; |
| 17 import '../universe/world_impact.dart' show WorldImpact; | 16 import '../universe/world_impact.dart' show WorldImpact; |
| 18 | 17 |
| 19 /// Interface for resolving native data for a target specific element. | 18 /// Interface for resolving native data for a target specific element. |
| 20 abstract class NativeRegistry { | 19 abstract class NativeRegistry { |
| 21 /// Registers [nativeData] as part of the resolution impact. | 20 /// Registers [nativeData] as part of the resolution impact. |
| 22 void registerNativeData(dynamic nativeData); | 21 void registerNativeData(dynamic nativeData); |
| 23 } | 22 } |
| (...skipping 13 matching lines...) Expand all Loading... |
| 37 | 36 |
| 38 /// Target-specific transformation for resolution world impacts. | 37 /// Target-specific transformation for resolution world impacts. |
| 39 /// | 38 /// |
| 40 /// This processes target-agnostic [ResolutionImpact]s and creates [WorldImpact] | 39 /// This processes target-agnostic [ResolutionImpact]s and creates [WorldImpact] |
| 41 /// in which backend/target specific impact data is added, for example: if | 40 /// in which backend/target specific impact data is added, for example: if |
| 42 /// certain feature is used that requires some helper code from the backend | 41 /// certain feature is used that requires some helper code from the backend |
| 43 /// libraries, this will be included by the impact transformer. | 42 /// libraries, this will be included by the impact transformer. |
| 44 class ImpactTransformer { | 43 class ImpactTransformer { |
| 45 /// Transform the [ResolutionImpact] into a [WorldImpact] adding the | 44 /// Transform the [ResolutionImpact] into a [WorldImpact] adding the |
| 46 /// backend dependencies for features used in [worldImpact]. | 45 /// backend dependencies for features used in [worldImpact]. |
| 47 WorldImpact transformResolutionImpact( | 46 WorldImpact transformResolutionImpact(ResolutionImpact worldImpact) { |
| 48 ResolutionEnqueuer enqueuer, ResolutionImpact worldImpact) { | |
| 49 return worldImpact; | 47 return worldImpact; |
| 50 } | 48 } |
| 51 } | 49 } |
| 52 | 50 |
| 53 /// Interface for serialization of backend specific data. | 51 /// Interface for serialization of backend specific data. |
| 54 class BackendSerialization { | 52 class BackendSerialization { |
| 55 const BackendSerialization(); | 53 const BackendSerialization(); |
| 56 | 54 |
| 57 SerializerPlugin get serializer => const SerializerPlugin(); | 55 SerializerPlugin get serializer => const SerializerPlugin(); |
| 58 DeserializerPlugin get deserializer => const DeserializerPlugin(); | 56 DeserializerPlugin get deserializer => const DeserializerPlugin(); |
| (...skipping 120 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 179 InterfaceType getConstantMapTypeFor(InterfaceType sourceType, | 177 InterfaceType getConstantMapTypeFor(InterfaceType sourceType, |
| 180 {bool hasProtoKey: false, bool onlyStringKeys: false}); | 178 {bool hasProtoKey: false, bool onlyStringKeys: false}); |
| 181 | 179 |
| 182 /// Returns the type of the constant symbol implementation class. | 180 /// Returns the type of the constant symbol implementation class. |
| 183 InterfaceType get symbolType; | 181 InterfaceType get symbolType; |
| 184 | 182 |
| 185 /// Returns the field of the constant symbol implementation class that holds | 183 /// Returns the field of the constant symbol implementation class that holds |
| 186 /// its internal name. | 184 /// its internal name. |
| 187 FieldEntity get symbolField; | 185 FieldEntity get symbolField; |
| 188 } | 186 } |
| OLD | NEW |