43206b1d9a
In a follow CL, I'm planning to try to pass inference contexts around on the stack rather than using static calls to InferenceContext. This should be both more performant (since it will use less memory and won't require map lookups) and easier to debug. To prepare for this I want to get rid of migration engine's use of InferenceContext.getContext(). It turns out that the only contexts needed by the migration engine were (a) the context of an expression passed to modifyExpressionType(), and (b) the context of any binary `??` expressions that are its parent. I've addressed (a) by passing the context as a parameter to modifyExpressionType(), and I've addressed (b) by creating an additional hook that records the context of any binary expression at the time it is entered. Change-Id: Ic844d40b5323fcee2ec8bde052449cbe9d878cc4 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/229361 Reviewed-by: Konstantin Shcheglov <scheglov@google.com> Commit-Queue: Paul Berry <paulberry@google.com>