- Coral mutable state in prepration for thread-safe subtyping / glb / type printing.
- Side benefit: Impose structure on gargantuan source file.
- Comments in the file that delimit sections are a code smell to me.
- Type ADT
- Subtyping / Equivalence
- LUB/GLB
- Base Class calculation
- TypeTraverser / TypeCollector / TypeMap
- Many instances of these for specific purposes.
- common owner
- adaptToNewRun
- Type constraint solving
- Miscellania
- Types
- Type ADT
- TypeComparers
- Subtyping / Equivalence
- LubGlbs
- TypeMaps
- Base classes for type-map/collect/traverse
- Implemenatations (perhaps split non-trivial ones like common owner to separate files?)
- TypeToStrings
New subpackage: scala.reflect.internal.types?
- Keep things compiling after each edit.
- Temporarily loosen access of referenced privates to public
- Keep methods in the same order as Types.
- Restore
private
once things are grouped accordingly.- or
private[types]
if need be.
- or
- No other changes in the first refactoring step.
- Analyse the usage of each item of mutable state.
- Record unique stack trace to the state with
Origins
.
- Record unique stack trace to the state with
- Remove all mutable state the top level. Either.
- move groups of methods that use them into a nested class which has a copy of that state as fields.
- Pass the state through the call chain
- as an extra mutable parameter
- or an extra immutable parameter + an extra immutable return value.
Typers.scala or Types.scala?