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

Side by Side Diff: pkg/compiler/lib/src/dart_types.dart

Issue 1153603006: dart2js cps: Type casts and related changes to type propagation. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Another typo in SExpression unstrngifier Created 5 years, 6 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 dart_types; 5 library dart_types;
6 6
7 import 'dart:math' show min; 7 import 'dart:math' show min;
8 8
9 import 'core_types.dart'; 9 import 'core_types.dart';
10 import 'dart2jslib.dart' show Compiler, invariant, Script, Message; 10 import 'dart2jslib.dart' show Compiler, invariant, Script, Message;
(...skipping 1214 matching lines...) Expand 10 before | Expand all | Expand 10 after
1225 TypeVariableType typeVariable, 1225 TypeVariableType typeVariable,
1226 DartType bound); 1226 DartType bound);
1227 1227
1228 /// Basic interface for the Dart type system. 1228 /// Basic interface for the Dart type system.
1229 abstract class DartTypes { 1229 abstract class DartTypes {
1230 /// The types defined in 'dart:core'. 1230 /// The types defined in 'dart:core'.
1231 CoreTypes get coreTypes; 1231 CoreTypes get coreTypes;
1232 1232
1233 /// Returns `true` if [t] is a subtype of [s]. 1233 /// Returns `true` if [t] is a subtype of [s].
1234 bool isSubtype(DartType t, DartType s); 1234 bool isSubtype(DartType t, DartType s);
1235
1236 /// Returns `true` if [t] might be a subtype of [s] for some values of
1237 /// type variables in [s] and [t].
1238 bool isPotentialSubtype(DartType t, DartType s);
1235 } 1239 }
1236 1240
1237 class Types implements DartTypes { 1241 class Types implements DartTypes {
1238 // TODO(johnniwinther): Replace by [CoreTypes]. 1242 // TODO(johnniwinther): Replace by [CoreTypes].
1239 final Compiler compiler; 1243 final Compiler compiler;
1240 final MoreSpecificVisitor moreSpecificVisitor; 1244 final MoreSpecificVisitor moreSpecificVisitor;
1241 final SubtypeVisitor subtypeVisitor; 1245 final SubtypeVisitor subtypeVisitor;
1242 final PotentialSubtypeVisitor potentialSubtypeVisitor; 1246 final PotentialSubtypeVisitor potentialSubtypeVisitor;
1243 1247
1244 CoreTypes get coreTypes => compiler.coreTypes; 1248 CoreTypes get coreTypes => compiler.coreTypes;
(...skipping 633 matching lines...) Expand 10 before | Expand all | Expand 10 after
1878 } 1882 }
1879 namedParameterTypes[index].accept(this, namedParameters[index]); 1883 namedParameterTypes[index].accept(this, namedParameters[index]);
1880 needsComma = true; 1884 needsComma = true;
1881 } 1885 }
1882 sb.write('}'); 1886 sb.write('}');
1883 } 1887 }
1884 sb.write(')'); 1888 sb.write(')');
1885 } 1889 }
1886 } 1890 }
1887 1891
OLDNEW
« no previous file with comments | « pkg/compiler/lib/src/cps_ir/type_propagation.dart ('k') | pkg/compiler/lib/src/js_backend/backend.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698