Commit Graph

12 Commits

Author SHA1 Message Date
Paul Berry be01632bc0 Fix type inference of getters that "override" setters and vice versa.
Normally getters and setters are considered distinct and unrelated by
the type inference algorithm.  However, if a getter has no declared
type and doesn't override anything, then we fall back on inferring its
type from an inherited setter, and vice versa.

R=sigmund@google.com

Review-Url: https://codereview.chromium.org/2946733003 .
2017-06-20 05:34:31 -07:00
Konstantin Shcheglov bcf179c9fa Add the 'crossGettersSetters' flag to ClassHierarchy.forEachOverridePair().
We need to be able to get 'overrides' of setters with getters and vise
versa to support top-level inference.

R=ahe@google.com, kmillikin@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/2941363002 .
2017-06-17 18:32:44 -07:00
Konstantin Shcheglov 5fe793ec4e Use ClassHierarchy.applyChanges() in MixinFullResolution.
So, we let the hierarchy to decide how to react to the changes, and
instance of which class hierarchy to create.

This makes initial compilation with Kernel Driver about 5% faster.

R=ahe@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/2924333002 .
2017-06-08 14:00:51 -07:00
Konstantin Shcheglov 8ec1f95af6 Replace ClassHierarchy.classes with getOrderedClasses().
R=ahe@google.com, kmillikin@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/2924713002 .
2017-06-05 20:23:13 -07:00
Konstantin Shcheglov 64ce51ce4b Fix the test and implement forEachOverridePair() for IncrementalClassHierarchy.
R=ahe@google.com, kmillikin@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/2920323002 .
2017-06-05 13:11:29 -07:00
Konstantin Shcheglov 5cf61cb0dc Implement getInterfaceMember() for IncrementalClassHierarchy.
R=ahe@google.com, kmillikin@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/2916383003 .
2017-06-03 18:52:00 -07:00
Konstantin Shcheglov 952687a64f Implement getDispatchTarget() in IncrementalClassHierarchy.
R=ahe@google.com, kmillikin@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/2916403002 .
2017-06-02 13:58:26 -07:00
Konstantin Shcheglov 99363d42d0 Implement getClassicLeastUpperBound() in IncrementalClassHierarchy.
R=ahe@google.com, kmillikin@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/2921083002 .
2017-06-02 13:46:58 -07:00
Konstantin Shcheglov c2b5ae00ce Implement getClassAsInstanceOf() and getTypeAsInstanceOf() for IncrementalClassHierarchy.
R=ahe@google.com, kmillikin@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/2915263003 .
2017-06-02 11:54:47 -07:00
Konstantin Shcheglov 4301ce842a Implement IncrementalClassHierarchy.getRankedSuperclasses().
R=ahe@google.com, kmillikin@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/2916323002 .
2017-06-02 09:15:44 -07:00
Konstantin Shcheglov 65c1f5f8ab Start implementing IncrementalClassHierarchy.
Only getClassDepth() for now.

R=ahe@google.com, kmillikin@google.com, paulberry@google.com, sigmund@google.com
BUG=

Review-Url: https://codereview.chromium.org/2922533002 .
2017-06-01 15:01:51 -07:00
Paul Berry 29570728a3 Implement Dart 1.0 LUB algorithm (for interface types) in kernel.
Note: I intend to implement the full LUB algorithm (including strong
mode behaviors) in front_end, however this piece of the algorithm
makes sense to be in kernel so that it can take advantage of
_ClassInfo.

R=ahe@google.com, johnniwinther@google.com

Review-Url: https://codereview.chromium.org/2848083002 .
2017-05-01 11:25:47 -07:00