|
|
Introduce Substitution class and Supertype class.
Type annotations in the supertype clauses of a class are now Supertypes
instead of InterfaceTypes. In the current version, the two classes
contain the same information, but they are about to diverge in the
following ways:
- An InterfaceType may be nullable, whereas a supertype cannot.
- An InterfaceType may represent the exact class, a subclass, or
a subtype of the given class.
- The type arguments to an interface type represent bounds, whereas
the arguments to a supertype are always exact.
We also introduce a class Substitution that represents an operator
that replaces type parameters with types, depending on the variance
of their use site.
A substitution can be applied to a DartType or a Supertype, and can
be generated independently of how it will be applied.
BUG=
R=kmillikin@google.com
Committed: https://github.com/dart-lang/kernel/commit/e1c26f830e8cee1f73b8a0b5aa3dd665c0ce5da0
|
Unified diffs |
Side-by-side diffs |
Delta from patch set |
Stats (+397 lines, -188 lines) |
Patch |
 |
M |
lib/analyzer/ast_from_analyzer.dart
|
View
|
|
2 chunks |
+17 lines, -1 line |
0 comments
|
Download
|
 |
M |
lib/analyzer/loader.dart
|
View
|
|
3 chunks |
+34 lines, -39 lines |
0 comments
|
Download
|
 |
M |
lib/ast.dart
|
View
|
|
15 chunks |
+104 lines, -27 lines |
0 comments
|
Download
|
 |
M |
lib/binary/ast_from_binary.dart
|
View
|
|
3 chunks |
+17 lines, -4 lines |
0 comments
|
Download
|
 |
M |
lib/binary/ast_to_binary.dart
|
View
|
|
1 chunk |
+11 lines, -0 lines |
0 comments
|
Download
|
 |
M |
lib/class_hierarchy.dart
|
View
|
|
5 chunks |
+15 lines, -13 lines |
0 comments
|
Download
|
 |
M |
lib/text/ast_to_text.dart
|
View
|
|
2 chunks |
+17 lines, -4 lines |
0 comments
|
Download
|
 |
M |
lib/transformations/treeshaker.dart
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
lib/type_algebra.dart
|
View
|
|
8 chunks |
+155 lines, -86 lines |
0 comments
|
Download
|
 |
M |
lib/type_propagation/builder.dart
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
lib/visitor.dart
|
View
|
|
2 chunks |
+3 lines, -0 lines |
0 comments
|
Download
|
 |
M |
test/class_hierarchy_basic.dart
|
View
|
|
4 chunks |
+10 lines, -7 lines |
0 comments
|
Download
|
 |
M |
test/type_parser.dart
|
View
|
|
1 chunk |
+5 lines, -0 lines |
0 comments
|
Download
|
 |
M |
test/type_substitute_bounds_test.dart
|
View
|
|
1 chunk |
+3 lines, -1 line |
0 comments
|
Download
|
 |
M |
test/type_substitution_identity_test.dart
|
View
|
|
1 chunk |
+1 line, -1 line |
0 comments
|
Download
|
 |
M |
test/type_subtype_test.dart
|
View
|
|
2 chunks |
+3 lines, -3 lines |
0 comments
|
Download
|
Total messages: 10 (3 generated)
|