Dotty Documentation

0.4.0-bin-SNAPSHOT

class Valify
extends Optimisation

Rewrite vars with exactly one assignment as vals.

[-] Constructors

Valify ( simplifyPhase: Simplify )

[-] Members

[+] val defined : Map [ Symbol, ValDef ]
[+] val firstRead : Map [ Symbol, RefTree ]
[+] val firstWrite : Map [ Symbol, Assign ]
[+] val secondWrite : Map [ Symbol, Assign ]
[+] val simplifyPhase : Simplify
[+] def clear ( ) : Unit

Clears all the state of this optimisation, to be run last.

[+] def transformer ( implicit ctx: Context ) : Tree => Tree

Does the actual Tree => Tree transformation.

[+] def visitor ( implicit ctx: Context ) : Tree => Unit

Gathers information on trees (using mutation), to be run first.