Commit Graph

2 Commits

Author SHA1 Message Date
Paul Berry e2bc5513f0 Migration: add a data structure for tracking class hierarchy information.
The new data structure, called `DecoratedClassHierarchy`, computes and
caches the variable substitutions necessary to relate a class to one
of its superclasses.  In future CLs, we'll use this information to
create the appropriate contraints for override relationships, and to
compute the correct types when a method dispatch resolves to a method
declared in a superclass.

Note that the analyzer uses `InhertanceManager2` both to determine
what a method call resolves to and to record the appropriate
substitutions.  We can take advantage of its determination of what a
method call resolves to (that information is stored in the resolved
AST), but we need to cmopute the substitutions separately because the
substitutions need to be decorated with nullability nodes.

Change-Id: Ifb334972e509b77151d41f7e0700cd590d7b5417
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106800
Commit-Queue: Paul Berry <paulberry@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Dan Rubel <danrubel@google.com>
2019-06-21 22:42:01 +00:00
Paul Berry d622fa010b Migration: Split up migration_visitor_test.dart.
This will make it easier to re-use the test infrastructure for some
other tests I plan to introduce in a follow-up CL.

Change-Id: I0a243f00f342674fe38274eb46e7c1e943817785
Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/106442
Reviewed-by: Konstantin Shcheglov <scheglov@google.com>
Reviewed-by: Brian Wilkerson <brianwilkerson@google.com>
Commit-Queue: Paul Berry <paulberry@google.com>
2019-06-18 17:43:05 +00:00