Dotty Documentation

0.15.0-bin-SNAPSHOT

class Instrumentation
extends MiniPhase

The phase is enabled if a -Yinstrument-... option is set. If enabled, it counts the number of closures or allocations for each source position. It does this by generating a call to dotty.tools.dotc.util.Stats.doRecord.

[-] Constructors

Instrumentation ( )

[-] Members

[+] private var consEqName : TermName
[+] private var consName : TermName
[+] private def consEqName_= ( x$1: TermName ) : Unit
[+] private def consName_= ( x$1: TermName ) : Unit
[+] override def isEnabled ( 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 prepareForUnit ( tree: Tree ) ( implicit ctx: Context ) : Context
[+] private def record ( category: String , tree: Tree ) ( implicit ctx: Context ) : Tree
[+] override def transformApply ( tree: Apply ) ( implicit ctx: Context ) : Tree
[+] override def transformBlock ( tree: Block ) ( implicit ctx: Context ) : Block