In an effort to make this code easier to read and extend, this splits out helper functions for the transfer function of the data flow. Due to the other results computed during the phases, we can't completely abstract away everything, but we can abstract the actual state transitions.
The motivation here is the following upcoming changes:
- The fault first load patch - already approved, this will be rebased over - adds another case into the transferAfter path.
- An upcoming patch to fold the local prepass back into the main algorithm greatly complicates the transferBefore logic.