Closed magnus-madsen closed 2 months ago
Enjoy your work by seeing how much prettier direct-style is, and seeing if --Xbenchmark-phases improves. (I expect 2x improvement!)
visitType
has a local visit function that can simply be removedtoSoftFailure
with usage of sctx
(i.e. just add the error).Validation
from all function return types.
Each in separate PR:
toSoftFailure
with usage of sctx (i.e. just add the error).Try keep local variables, e.g. if the code is:
then it simply becomes
Note: Don't inline the visitExp calls.
Keep the structure: don't make other changes during the refactor.
If during the refactor a validation is needed, just do Validation.success(foo). This keeps each PR clean.
If you see code without local variables, e.g.:
please introduce them, e.g. here we would have an
e
.