Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(250)

Side by Side Diff: pkg/compiler/lib/src/common/backend_api.dart

Issue 2728393005: Extract CodegenImpactTransformer from ImpactTransformer (Closed)
Patch Set: Updated cf. comments. Created 3 years, 9 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
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.dart'; 7 import '../common.dart';
8 import '../common/codegen.dart' show CodegenImpact; 8 import '../common/codegen.dart' show CodegenImpact;
9 import '../common/resolution.dart' show ResolutionImpact; 9 import '../common/resolution.dart' show ResolutionImpact;
10 import '../constants/expressions.dart' show ConstantExpression; 10 import '../constants/expressions.dart' show ConstantExpression;
(...skipping 19 matching lines...) Expand all
30 /// a constant expression. 30 /// a constant expression.
31 ConstantExpression getConstant(Node node); 31 ConstantExpression getConstant(Node node);
32 32
33 /// Registers [type] as instantiated. 33 /// Registers [type] as instantiated.
34 void registerInstantiatedType(ResolutionInterfaceType type); 34 void registerInstantiatedType(ResolutionInterfaceType type);
35 35
36 /// Resolves [typeName] to a type in the context of [node]. 36 /// Resolves [typeName] to a type in the context of [node].
37 ResolutionDartType resolveTypeFromString(Node node, String typeName); 37 ResolutionDartType resolveTypeFromString(Node node, String typeName);
38 } 38 }
39 39
40 /// Backend transformation methods for the world impacts. 40 /// Target-specific transformation for resolution world impacts.
41 ///
42 /// This processes target-agnostic [ResolutionImpact]s and creates [WorldImpact]
43 /// in which backend/target specific impact data is added, for example: if
44 /// certain feature is used that requires some helper code from the backend
45 /// libraries, this will be included by the impact transformer.
41 class ImpactTransformer { 46 class ImpactTransformer {
42 /// Transform the [ResolutionImpact] into a [WorldImpact] adding the 47 /// Transform the [ResolutionImpact] into a [WorldImpact] adding the
43 /// backend dependencies for features used in [worldImpact]. 48 /// backend dependencies for features used in [worldImpact].
44 WorldImpact transformResolutionImpact( 49 WorldImpact transformResolutionImpact(
45 ResolutionEnqueuer enqueuer, ResolutionImpact worldImpact) { 50 ResolutionEnqueuer enqueuer, ResolutionImpact worldImpact) {
46 return worldImpact; 51 return worldImpact;
47 } 52 }
48
49 /// Transform the [CodegenImpact] into a [WorldImpact] adding the
50 /// backend dependencies for features used in [worldImpact].
51 WorldImpact transformCodegenImpact(CodegenImpact worldImpact) {
52 return worldImpact;
53 }
54 } 53 }
55 54
56 /// Interface for serialization of backend specific data. 55 /// Interface for serialization of backend specific data.
57 class BackendSerialization { 56 class BackendSerialization {
58 const BackendSerialization(); 57 const BackendSerialization();
59 58
60 SerializerPlugin get serializer => const SerializerPlugin(); 59 SerializerPlugin get serializer => const SerializerPlugin();
61 DeserializerPlugin get deserializer => const DeserializerPlugin(); 60 DeserializerPlugin get deserializer => const DeserializerPlugin();
62 } 61 }
63 62
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 InterfaceType getConstantMapTypeFor(InterfaceType sourceType, 181 InterfaceType getConstantMapTypeFor(InterfaceType sourceType,
183 {bool hasProtoKey: false, bool onlyStringKeys: false}); 182 {bool hasProtoKey: false, bool onlyStringKeys: false});
184 183
185 /// Returns the type of the constant symbol implementation class. 184 /// Returns the type of the constant symbol implementation class.
186 InterfaceType get symbolType; 185 InterfaceType get symbolType;
187 186
188 /// Returns the field of the constant symbol implementation class that holds 187 /// Returns the field of the constant symbol implementation class that holds
189 /// its internal name. 188 /// its internal name.
190 FieldEntity get symbolField; 189 FieldEntity get symbolField;
191 } 190 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698