Dotty Documentation

0.4.0-bin-SNAPSHOT

class Constructors
extends MiniPhaseTransform with IdentityDenotTransformer

This transform - moves initializers from body to constructor. - makes all supercalls explicit - also moves private fields that are accessed only from constructor into the constructor if possible.

[-] Constructors

Constructors ( )

[-] Members

[+] private final val MutableParamAccessor : FlagConjunction
[+] private val retainedPrivateVals : Set [ Symbol ]

The private vals that are known to be retained as class fields

[+] private val seenPrivateVals : Set [ Symbol ]

The private vals whose definition comes before the current focus

[+] override def checkPostCondition ( tree: Tree ) ( implicit ctx: Context ) : Unit

All initializers for non-lazy fields should be moved into constructor. All non-abstract methods should be implemented (this is assured for constructors in this phase and for other methods in memoize).

[+] private def markUsedPrivateSymbols ( tree: RefTree ) ( implicit ctx: Context ) : Unit
[+] private def mightBeDropped ( sym: Symbol ) ( implicit ctx: Context ) : Boolean

Class members that can be eliminated if referenced only from their own constructor.

[+] private def noDirectRefsFrom ( tree: Tree ) ( implicit ctx: Context ) : Boolean
[+] override def phaseName : String

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
[+] override def runsAfter : Set [ Class [ Nothing <: Phase ] ]

List of names of phases that should precede this phase

[+] override def runsAfterGroupsOf : Set [ Class [ Nothing <: Phase ] ]

List of names of phases that should have finished their processing of all compilation units before this phase starts

[+] override def transformIdent ( tree: Ident ) ( implicit ctx: Context , info: TransformerInfo ) : Tree
[+] override def transformSelect ( tree: Select ) ( implicit ctx: Context , info: TransformerInfo ) : Tree
[+] override def transformTemplate ( tree: Template ) ( implicit ctx: Context , info: TransformerInfo ) : Tree
[+] override def transformValDef ( tree: ValDef ) ( implicit ctx: Context , info: TransformerInfo ) : Tree