Dotty Documentation

0.5.0-bin-SNAPSHOT

class InlineLabelsCalledOnce
extends Object with Optimisation

Inlines LabelDef which are used exactly once.

[-] Constructors

InlineLabelsCalledOnce ( )

[-] Members

[+] val defined : HashMap [ Symbol, DefDef ]
[+] val timesUsed : HashMap [ Symbol, Int ]
[+] def clear ( ) : Unit

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

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

Does the actual Tree => Tree transformation.

[+] def usedN ( t: Tree , n: Int ) ( implicit ctx: Context ) : Boolean
[+] def usedOnce ( t: Tree ) ( implicit ctx: Context ) : Boolean
[+] def visitor ( implicit ctx: Context ) : Tree => Unit

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