Performs the following rewritings for fields of a class:
Omitted from the rewritings are
- private[this] fields in classes (excluding traits, value classes)
- fields generated for static modules (TODO: needed?)
- parameters, static fields, and fields coming from Java
Furthermore, assignments to mutable vars are replaced by setter calls
p.x = e --> p.x_=(e)
No fields are generated yet. This is done later in phase Memoize.
Also, drop the Local flag from all private[this] and protected[this] members. This allows subsequent code motions in Flatten.
A name given to the
Phase that can be used to debug the compiler. For
instance, it is possible to print trees after a given phase using:
$ ./bin/dotc -Xprint:<phaseNameHere> sourceFile.scala