It works for top-levels, fields, locals, prefixed expressions.
Integration is not the most efficient - we resolve the full unit.
It works fine for files with about 1000 lines, about 50-70 ms.
We could slightly improve timing if we prioritize completion over
navigation and highlight notifications, which are currently prepared
and sent before completion.
In giant files like src/dart/element/element.dart, about 8500 lines,
it takes about 400 ms from typing to receiving completion. The theoretical
bottom bound for such files is about 70 ms - time that it required to
parse, create unlinked bundle, ensure that the API signature is the
same, load linked bundles and prepare to resynthesize. On top of this
goes any time required to resolve a single method and completion itself.
R=brianwilkerson@google.com, paulberry@google.com
BUG=
Review URL: https://codereview.chromium.org/2478963002 .
This CL aborts completion requests (returns empty list of completions)
if either a newer completion request is received
or the source changes after the completion request was received.
In addition, I wrapped calls to AnalysisFutureHelper computeAsync
in exception handlers so that it will be easier to track async exceptions
back to the code that requested the computations.
R=brianwilkerson@google.com
Review URL: https://codereview.chromium.org/1685653002 .