Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Break the optimiser into separate functions.
The optimiser has now exceeded even my (high!) tolerance for long functions. Previously it was structured as: ```rust match inst { Inst::A => { ... } Inst::B => { ... } } ``` where the `...`s could be arbitrarily long. This commit -- which has no functional change, despite its size! -- changes the structure to: ```rust match inst { Inst::A => self.opt_a(...), Inst::B => self.opt_b(...), } ``` So now each instruction has its "own" function. `opt_binop` is still fearsomely large, but this commit moves us in a more sustainable direction.
- Loading branch information