58a42b5cfc
Instead of using InferenceContext.getContext and InferenceContext.setType to associate type inference information with VariableDeclaration nodes, we pass the information on the stack using a new FunctionBodyImpl.resolve method. This should be more efficient for two reasons: it avoids a map lookup, and it avoids the double dispatch traditionally associated with calling a visitor. It should also make the code easier to reason about (since it makes the flow of data in the type inference process more explicit). This is part of a larger effort to elimiate the use of InferenceContext.getContext and InferenceContext.setType entirely. Change-Id: I8a3f3be940acdcd0a2c4ad8ec37b41bafe25c952 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/230948 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Paul Berry <paulberry@google.com>