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

Side by Side Diff: pkg/compiler/lib/src/elements/resolution_types.dart

Issue 2954493002: Less inequivalence on Hello World! (Closed)
Patch Set: Updated cf. comments Created 3 years, 5 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/compiler.dart ('k') | pkg/compiler/lib/src/elements/types.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 /// Implementation of the Dart types hierarchy in 'types.dart' specifically 5 /// Implementation of the Dart types hierarchy in 'types.dart' specifically
6 /// tailored to the resolution phase of the compiler. 6 /// tailored to the resolution phase of the compiler.
7 7
8 library resolution_types; 8 library resolution_types;
9 9
10 import 'dart:math' show min; 10 import 'dart:math' show min;
(...skipping 1120 matching lines...) Expand 10 before | Expand all | Expand 10 after
1131 cls.supertype; 1131 cls.supertype;
1132 1132
1133 @override 1133 @override
1134 Iterable<InterfaceType> getSupertypes(covariant ClassElement cls) { 1134 Iterable<InterfaceType> getSupertypes(covariant ClassElement cls) {
1135 assert(cls.allSupertypes != null, 1135 assert(cls.allSupertypes != null,
1136 failedAt(cls, 'Supertypes have not been computed for $cls.')); 1136 failedAt(cls, 'Supertypes have not been computed for $cls.'));
1137 return cls.allSupertypes; 1137 return cls.allSupertypes;
1138 } 1138 }
1139 1139
1140 @override 1140 @override
1141 Iterable<InterfaceType> getInterfaces(covariant ClassElement cls) {
1142 return new List<InterfaceType>.from(cls.interfaces.toList());
1143 }
1144
1145 @override
1141 FunctionType getCallType(covariant ResolutionInterfaceType type) => 1146 FunctionType getCallType(covariant ResolutionInterfaceType type) =>
1142 type.callType; 1147 type.callType;
1143 1148
1144 /// Flatten [type] by recursively removing enclosing `Future` annotations. 1149 /// Flatten [type] by recursively removing enclosing `Future` annotations.
1145 /// 1150 ///
1146 /// Defined in the language specification as: 1151 /// Defined in the language specification as:
1147 /// 1152 ///
1148 /// If T = Future<S> then flatten(T) = flatten(S). 1153 /// If T = Future<S> then flatten(T) = flatten(S).
1149 /// Otherwise if T <: Future then let S be a type such that T << Future<S> 1154 /// Otherwise if T <: Future then let S be a type such that T << Future<S>
1150 /// and for all R, if T << Future<R> then S << R. Then flatten(T) = S. 1155 /// and for all R, if T << Future<R> then S << R. Then flatten(T) = S.
(...skipping 679 matching lines...) Expand 10 before | Expand all | Expand 10 after
1830 sb.write(', '); 1835 sb.write(', ');
1831 } 1836 }
1832 namedParameterTypes[index].accept(this, namedParameters[index]); 1837 namedParameterTypes[index].accept(this, namedParameters[index]);
1833 needsComma = true; 1838 needsComma = true;
1834 } 1839 }
1835 sb.write('}'); 1840 sb.write('}');
1836 } 1841 }
1837 sb.write(')'); 1842 sb.write(')');
1838 } 1843 }
1839 } 1844 }
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/compiler.dart ('k') | pkg/compiler/lib/src/elements/types.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698