1091aed650
The diff makes this change look bigger than it is. Here's how the code worked before: `compute()` called `_addFromProducers()`. `_addFromProducers()` had a local function, also called `compute()`, which is called per CorrectionProducer. The local `compute()` function would unconditionally create a ChangeBuilder and call each CorrectionProducer's `compute()` method, then call back out to an instance method called `_addFixFromBuilder()`, which would drop the computed change on the floor if `fixKind` was `null`. This CL contains the following changes to the above system: * The local `compute()` function and the instance method, `_addFixFromBuilder()` are combined together, into one instance method, `_addFromProducer()`. * Then, the `fixKind` check is moved to the very top of that method, bailing out _before_ computing changes if `fixKind == null`. Change-Id: I6c61059fc36ec1587b15ca01b43830a5b179da9a Reviewed-on: https://dart-review.googlesource.com/c/sdk/+/417326 Reviewed-by: Brian Wilkerson <brianwilkerson@google.com> Commit-Queue: Samuel Rawlins <srawlins@google.com>