Dotty Documentation

0.4.0-bin-SNAPSHOT

class DropNoEffects
extends Optimisation

Removes side effect free statements in blocks and Defdef. Flattens blocks (except Closure-blocks) Note: BoxedUnit currently messes up this phase when run after erasure

[-] Constructors

DropNoEffects ( simplifyPhase: Simplify )

[-] Members

[+] val constructorWhiteList : Set [ String ]
[+] val methodsWhiteList : List [ String ]
[+] val moduleWhiteList : Set [ String ]
[+] val simplifyPhase : Simplify
[+] def clear ( ) : Unit

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

[+] def effectsDontEscape ( t: Tree ) ( implicit ctx: Context ) : Boolean

Does this tree has side effects? This is an approximation awaiting real purity analysis...

[+] def keepOnlySideEffects ( t: Tree ) ( implicit ctx: Context ) : Tree
[+] 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.