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

Side by Side Diff: pkg/compiler/lib/src/serialization/modelz.dart

Issue 1383503002: Add Resolution and Parsing interfaces for computeType, ensureResolved and parseNode. (Closed) Base URL: https://github.com/dart-lang/sdk.git@master
Patch Set: Add TODOs. Created 5 years, 2 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 | « pkg/compiler/lib/src/resolution/typedefs.dart ('k') | pkg/compiler/lib/src/ssa/builder.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) 2015, the Dart project authors. Please see the AUTHORS file 1 // Copyright (c) 2015, 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 /// Implementation of the element model used for deserialiation. 5 /// Implementation of the element model used for deserialiation.
6 /// 6 ///
7 /// These classes are created by [ElementDeserializer] triggered by the 7 /// These classes are created by [ElementDeserializer] triggered by the
8 /// [Deserializer]. 8 /// [Deserializer].
9 9
10 library dart2js.serialization.modelz; 10 library dart2js.serialization.modelz;
11 11
12 import 'serialization.dart'; 12 import 'serialization.dart';
13 import 'keys.dart'; 13 import 'keys.dart';
14 import '../common/resolution.dart' show
15 Resolution;
14 import '../compiler.dart' 16 import '../compiler.dart'
15 show Compiler; 17 show Compiler;
16 import '../constants/constructors.dart'; 18 import '../constants/constructors.dart';
17 import '../constants/expressions.dart'; 19 import '../constants/expressions.dart';
18 import '../diagnostics/source_span.dart' 20 import '../diagnostics/source_span.dart'
19 show SourceSpan; 21 show SourceSpan;
20 import '../dart_types.dart'; 22 import '../dart_types.dart';
21 import '../diagnostics/diagnostic_listener.dart';
22 import '../elements/elements.dart'; 23 import '../elements/elements.dart';
23 import '../elements/modelx.dart' show 24 import '../elements/modelx.dart' show
24 FunctionSignatureX; 25 FunctionSignatureX;
25 import '../elements/common.dart'; 26 import '../elements/common.dart';
26 import '../elements/visitor.dart'; 27 import '../elements/visitor.dart';
27 import '../io/source_file.dart'; 28 import '../io/source_file.dart';
28 import '../ordered_typeset.dart'; 29 import '../ordered_typeset.dart';
29 import '../resolution/class_members.dart' as class_members; 30 import '../resolution/class_members.dart' as class_members;
30 import '../resolution/tree_elements.dart' show 31 import '../resolution/tree_elements.dart' show
31 TreeElements; 32 TreeElements;
(...skipping 623 matching lines...) Expand 10 before | Expand all | Expand 10 after
655 656
656 @override 657 @override
657 DartType get type { 658 DartType get type {
658 if (_type == null) { 659 if (_type == null) {
659 _type = _decoder.getType(Key.TYPE); 660 _type = _decoder.getType(Key.TYPE);
660 } 661 }
661 return _type; 662 return _type;
662 } 663 }
663 664
664 @override 665 @override
665 DartType computeType(Compiler compiler) => type; 666 DartType computeType(Resolution resolution) => type;
666 } 667 }
667 668
668 abstract class ParametersMixin 669 abstract class ParametersMixin
669 implements DeserializedElementZ, FunctionTypedElement { 670 implements DeserializedElementZ, FunctionTypedElement {
670 FunctionSignature _functionSignature; 671 FunctionSignature _functionSignature;
671 List<ParameterElement> _parameters; 672 List<ParameterElement> _parameters;
672 673
673 bool get hasFunctionSignature => true; 674 bool get hasFunctionSignature => true;
674 675
675 @override 676 @override
(...skipping 214 matching lines...) Expand 10 before | Expand all | Expand 10 after
890 @override 891 @override
891 String get nativeTagInfo => _unsupported('nativeTagInfo'); 892 String get nativeTagInfo => _unsupported('nativeTagInfo');
892 893
893 @override 894 @override
894 void reverseBackendMembers() => _unsupported('reverseBackendMembers'); 895 void reverseBackendMembers() => _unsupported('reverseBackendMembers');
895 896
896 @override 897 @override
897 ClassElement get superclass => supertype != null ? supertype.element : null; 898 ClassElement get superclass => supertype != null ? supertype.element : null;
898 899
899 @override 900 @override
900 void ensureResolved(Compiler compiler) { 901 void ensureResolved(Resolution resolution) {
901 compiler.world.registerClass(this); 902 resolution.registerClass(this);
902 } 903 }
903 } 904 }
904 905
905 abstract class ConstructorElementZ extends DeserializedElementZ 906 abstract class ConstructorElementZ extends DeserializedElementZ
906 with AnalyzableElementMixin, 907 with AnalyzableElementMixin,
907 AstElementMixin, 908 AstElementMixin,
908 ClassMemberMixin, 909 ClassMemberMixin,
909 FunctionTypedElementMixin, 910 FunctionTypedElementMixin,
910 ParametersMixin, 911 ParametersMixin,
911 TypedElementMixin, 912 TypedElementMixin,
(...skipping 317 matching lines...) Expand 10 before | Expand all | Expand 10 after
1229 return _rawType; 1230 return _rawType;
1230 } 1231 }
1231 1232
1232 @override 1233 @override
1233 T get thisType { 1234 T get thisType {
1234 _ensureTypes(); 1235 _ensureTypes();
1235 return _thisType; 1236 return _thisType;
1236 } 1237 }
1237 1238
1238 @override 1239 @override
1239 T computeType(Compiler compiler) => thisType; 1240 T computeType(Resolution resolution) => thisType;
1240 1241
1241 @override 1242 @override
1242 bool get isResolved => true; 1243 bool get isResolved => true;
1243 } 1244 }
1244 1245
1245 class TypedefElementZ extends DeserializedElementZ 1246 class TypedefElementZ extends DeserializedElementZ
1246 with AnalyzableElementMixin, 1247 with AnalyzableElementMixin,
1247 AstElementMixin, 1248 AstElementMixin,
1248 LibraryMemberMixin, 1249 LibraryMemberMixin,
1249 ParametersMixin, 1250 ParametersMixin,
(...skipping 18 matching lines...) Expand all
1268 1269
1269 @override 1270 @override
1270 DartType get alias { 1271 DartType get alias {
1271 if (_alias == null) { 1272 if (_alias == null) {
1272 _alias = _decoder.getType(Key.ALIAS); 1273 _alias = _decoder.getType(Key.ALIAS);
1273 } 1274 }
1274 return _alias; 1275 return _alias;
1275 } 1276 }
1276 1277
1277 @override 1278 @override
1278 void ensureResolved(Compiler compiler) {} 1279 void ensureResolved(Resolution resolution) {}
1279 1280
1280 @override 1281 @override
1281 void checkCyclicReference(Compiler compiler) {} 1282 void checkCyclicReference(Resolution resolution) {}
1282 } 1283 }
1283 1284
1284 class TypeVariableElementZ extends DeserializedElementZ 1285 class TypeVariableElementZ extends DeserializedElementZ
1285 with AnalyzableElementMixin, 1286 with AnalyzableElementMixin,
1286 AstElementMixin, 1287 AstElementMixin,
1287 TypedElementMixin 1288 TypedElementMixin
1288 implements TypeVariableElement { 1289 implements TypeVariableElement {
1289 TypeDeclarationElement _typeDeclaration; 1290 TypeDeclarationElement _typeDeclaration;
1290 TypeVariableType _type; 1291 TypeVariableType _type;
1291 DartType _bound; 1292 DartType _bound;
(...skipping 273 matching lines...) Expand 10 before | Expand all | Expand 10 after
1565 } 1566 }
1566 1567
1567 @override 1568 @override
1568 ElementKind get kind => ElementKind.PREFIX; 1569 ElementKind get kind => ElementKind.PREFIX;
1569 1570
1570 @override 1571 @override
1571 Element lookupLocalMember(String memberName) { 1572 Element lookupLocalMember(String memberName) {
1572 return _unsupported('lookupLocalMember'); 1573 return _unsupported('lookupLocalMember');
1573 } 1574 }
1574 } 1575 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/resolution/typedefs.dart ('k') | pkg/compiler/lib/src/ssa/builder.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698