Commit Graph

8 Commits

Author SHA1 Message Date
Karl Klose ff99a0ce59 Merge kernel closure conversion into the Dart SDK
This is the result of:
- taking the diff of the branch closure_conversion to master in the kernel
repository
- updating the file paths
- applying the diff to the Dart SDK
- fixing conflicts between the changes to pkg/kernel in the Dart SDK and the master branch in the kernel repository

R=asgerf@google.com

Review-Url: https://codereview.chromium.org/2561723003 .
2016-12-15 10:16:22 +01:00
Asger Feldthaus e63a33717e [kernel] Fix some strong mode issues.
BUG=
R=kmillikin@google.com

Review URL: https://codereview.chromium.org/2464843002 .
2016-11-14 10:23:37 +01:00
Asger Feldthaus f764b34682 [kernel] 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

Review URL: https://codereview.chromium.org/2439043002 .
2016-10-24 16:21:52 +02:00
Asger Feldthaus b0bfbadbc3 [kernel] Support interface members and overrides with duplicate member names.
When a class inherits two abstract members with the same name from
different supertypes, both members are now present the list returned
by ClassHierarchy.getInterfaceMembers. Previously, only one of the
member would be present.

This ensures that all override pairs can be detected, which in turn
is necessary for inserting covariance checks in strong mode.

Another change in this CL is that interface members are built
eagerly instead of on-demand. This makes the ClassHierarchy more
reliable when used for transformation, and easier to benchmark.

BUG=
R=kmillikin@google.com

Review URL: https://chromereviews.googleplex.com/520907013 .
2016-10-10 11:15:56 +02:00
Asger Feldthaus 75c24808ca [kernel] Add support for traversing all member override pairs.
BUG=
R=kmillikin@google.com

Review URL: https://chromereviews.googleplex.com/504227013 .
2016-09-13 12:40:11 +02:00
Asger Feldthaus b61129ee84 [kernel] Support interface member resolution in class hierarchy.
This is useful for handling of externals in tree shaking and type
propagation.

BUG=
R=ahe@google.com

Review URL: https://chromereviews.googleplex.com/435947013 .
2016-05-27 11:25:00 +02:00
Asger Feldthaus 9e4e37a4ae [kernel] Add more convenience methods and tweak the behavior of toString().
Also contains a bugfix for a missing visitor call.

BUG=
R=ahe@google.com

Review URL: https://chromereviews.googleplex.com/438627013 .
2016-05-25 13:56:43 +02:00
Asger Feldthaus 77d0b4b244 [kernel] Support member resolution in class hierarchy.
Review URL: https://chromereviews.googleplex.com/417107013 .
2016-05-09 14:12:40 +02:00