d68d8526f4
This required modifying the implementation of nullability migration so that it no longer holds onto AST nodes, but instead records sources and offsets. This will allow the tool to scale to large projects since the AST for one file can be garbage collected while the AST for another file is analyzed. Additional changes: - provisional_api_test.dart is updated so that it tests the API in two ways: once feeding identical ASTs to prepareInput/processInput, and once feeding conceptually equal (but not identical) ASTs. - The internal analyzer API is changed so that the finish() method simply returns a list of modifications, rather than a map from path to modification list. - Files are tracked by Source rather than by path. - Modification objects remember their Source (this should pave the way for allowing multiple files to be migrated in a single run of the tool). - The Variables class is split in two, with the methods needed for testing in a private class inside migration_test.dart. These test methods can retain pointers to AST nodes without creating scalability problems for the production code. Change-Id: Idd3f3b6893a25bb4294b4b4c820e20e4bc47ffd8 Reviewed-on: https://dart-review.googlesource.com/c/92220 Commit-Queue: Paul Berry <paulberry@google.com> Reviewed-by: Dan Rubel <danrubel@google.com> Reviewed-by: Konstantin Shcheglov <scheglov@google.com>