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

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

Issue 2728393005: Extract CodegenImpactTransformer from ImpactTransformer (Closed)
Patch Set: Make fields final. 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
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 /// Backend transformation for resolution world impacts.
Siggi Cherem (dart-lang) 2017/03/14 05:33:01 you might want to define what a impact transformat
Johnni Winther 2017/03/15 13:11:50 Done.
41 class ImpactTransformer { 41 class ImpactTransformer {
42 /// Transform the [ResolutionImpact] into a [WorldImpact] adding the 42 /// Transform the [ResolutionImpact] into a [WorldImpact] adding the
43 /// backend dependencies for features used in [worldImpact]. 43 /// backend dependencies for features used in [worldImpact].
44 WorldImpact transformResolutionImpact( 44 WorldImpact transformResolutionImpact(
45 ResolutionEnqueuer enqueuer, ResolutionImpact worldImpact) { 45 ResolutionEnqueuer enqueuer, ResolutionImpact worldImpact) {
46 return worldImpact; 46 return worldImpact;
47 } 47 }
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 } 48 }
55 49
56 /// Interface for serialization of backend specific data. 50 /// Interface for serialization of backend specific data.
57 class BackendSerialization { 51 class BackendSerialization {
58 const BackendSerialization(); 52 const BackendSerialization();
59 53
60 SerializerPlugin get serializer => const SerializerPlugin(); 54 SerializerPlugin get serializer => const SerializerPlugin();
61 DeserializerPlugin get deserializer => const DeserializerPlugin(); 55 DeserializerPlugin get deserializer => const DeserializerPlugin();
62 } 56 }
63 57
(...skipping 118 matching lines...) Expand 10 before | Expand all | Expand 10 after
182 InterfaceType getConstantMapTypeFor(InterfaceType sourceType, 176 InterfaceType getConstantMapTypeFor(InterfaceType sourceType,
183 {bool hasProtoKey: false, bool onlyStringKeys: false}); 177 {bool hasProtoKey: false, bool onlyStringKeys: false});
184 178
185 /// Returns the type of the constant symbol implementation class. 179 /// Returns the type of the constant symbol implementation class.
186 InterfaceType get symbolType; 180 InterfaceType get symbolType;
187 181
188 /// Returns the field of the constant symbol implementation class that holds 182 /// Returns the field of the constant symbol implementation class that holds
189 /// its internal name. 183 /// its internal name.
190 FieldEntity get symbolField; 184 FieldEntity get symbolField;
191 } 185 }
OLDNEW
« no previous file with comments | « no previous file | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | pkg/compiler/lib/src/js_backend/impact_transformer.dart » ('J')

Powered by Google App Engine
This is Rietveld 408576698