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

Issue 2439043002: Introduce Substitution class and Supertype class. (Closed)

Created:
4 years, 2 months ago by asgerf
Modified:
4 years, 1 month ago
CC:
dart-kernel+reviews_google.com
Target Ref:
refs/heads/master
Visibility:
Public.

Description

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

Patch Set 1 #

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

Messages

Total messages: 10 (3 generated)
asgerf
4 years, 1 month ago (2016-10-24 11:35:25 UTC) #2
ahe
DBC: You may be looking for this terminology: a supertype is concrete, an interface type ...
4 years, 1 month ago (2016-10-24 11:44:54 UTC) #4
Kevin Millikin (Google)
LGTM. I agree with Peter that the terminology might need to be tweaked. It's weird ...
4 years, 1 month ago (2016-10-24 13:35:48 UTC) #5
ahe
On 2016/10/24 13:35:48, Kevin Millikin (Google) wrote: > LGTM. > > I agree with Peter ...
4 years, 1 month ago (2016-10-24 13:42:12 UTC) #6
asgerf
On 2016/10/24 13:42:12, ahe wrote: > On 2016/10/24 13:35:48, Kevin Millikin (Google) wrote: > > ...
4 years, 1 month ago (2016-10-24 14:05:50 UTC) #7
ahe
On 2016/10/24 14:05:50, asgerf wrote: > What he calls "interfaces" are structural types, "class types" ...
4 years, 1 month ago (2016-10-24 14:08:08 UTC) #8
asgerf
4 years, 1 month ago (2016-10-24 14:22:00 UTC) #10
Message was sent while issue was closed.
Committed patchset #1 (id:1) manually as
e1c26f830e8cee1f73b8a0b5aa3dd665c0ce5da0 (presubmit successful).

Powered by Google App Engine
This is Rietveld 408576698