Dotty Documentation

0.4.0-bin-SNAPSHOT

class Devalify
extends Optimisation

Inline vals and remove vals that are aliases to other vals

Notion of alias is a by-value notion, so "good" casts are ignored.

This phase has to be careful not to eliminate vals that are parts of other types

[-] Constructors

Devalify ( )

[-] Members

[+] val copies : HashMap [ Symbol, Tree ]
[+] val defined : HashSet [ Symbol ]
[+] val timesUsed : HashMap [ Symbol, Int ]
[+] val timesUsedAsType : HashMap [ Symbol, Int ]
[+] val usedInInnerClass : HashMap [ Symbol, Int ]
[+] def clear ( ) : Unit

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

[+] def doVisit ( tree: Tree , used: HashMap [ Symbol, Int ] ) ( implicit ctx: Context ) : Unit
[+] def dropCasts ( t: Tree ) ( implicit ctx: Context ) : Tree
[+] def readingOnlyVals ( t: Tree ) ( implicit ctx: Context ) : Boolean
[+] def transformer ( implicit ctx: Context ) : Tree => Tree

Does the actual Tree => Tree transformation.

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

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