b3e725c54d
The motivation here was to remove the local duplicate variable, `node_final`. This variable only existed because the variable it duplicates loses its promoted type inside the `builder.addDartFileEdit` closure. It lose its promoted type because they are multiply assigned in a while loop. This CL extracts the first portion of the `compute()` method, which is solely concerned with computing the real "target". The diff looks large because of how that portion is moved into a helper method that is _below_ the second half of `compute()`. I think each of these changes then improves readability: extracting part of a 140-line long method into one helper, and avoiding a local duplicate variable. Change-Id: Ic209e4be49863657f969eadf909ab05d13e9a254 Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/417680 Reviewed-by: Phil Quitslund <pquitslund@google.com> Commit-Queue: Samuel Rawlins <srawlins@google.com>