Dotty Documentation

0.10.0-bin-SNAPSHOT

class Run
extends Object with ImplicitRunInfo with ConstraintRunInfo

A compiler run. Exports various methods to compile source files

[-] Constructors

Run ( comp: Compiler , ictx: Context )

[-] Members

[+] private object NoPrintedTree
[+] private sealed trait PrintedTree
[+] private case class SomePrintedTree
[+] private object SomePrintedTree
[+] private val comp : Compiler
[+] private var compiling : Boolean
[+] private var finalizeActions : ListBuffer [ () => Unit ]

Actions that need to be performed at the end of the current compilation run

[+] private val ictx : Context
[+] private var lateFiles : Set [ AbstractFile ]

The source files of all late entered symbols, as a set

[+] private var myCtx : Context
[+] private var myFiles : Set [ AbstractFile ]
[+] private var myUnits : List [ CompilationUnit ]
[+] private var myUnitsCached : List [ CompilationUnit ]
[+] def compile ( fileNames: List [ String ] ) : Unit
[+] def compile ( sourceCode: String ) : Unit
[+] def compileSources ( sources: List [ SourceFile ] ) : Unit

TODO: There's a fundamental design problem here: We assemble phases using squash when we first build the compiler. But we modify them with -Yskip, -Ystop on each run. That modification needs to either transform the tree structure, or we need to assemble phases on each run, and take -Yskip, -Ystop into account. I think the latter would be preferable.

[+] def compileUnits ( us: List [ CompilationUnit ] ) : Unit
[+] def compileUnits ( us: List [ CompilationUnit ] , ctx: Context ) : Unit
[+] protected def compileUnits ( ) ( implicit ctx: Context ) : Unit
[+] protected implicit def ctx : Context
[+] def files : Set [ AbstractFile ]

The files currently being compiled, this may return different results over time. These files do not have to be source files since it's possible to compile from TASTY.

[+] def getSource ( fileName: String ) : SourceFile
[+] def lateCompile ( file: AbstractFile , typeCheck: Boolean ) ( implicit ctx: Context ) : Unit

Enter top-level definitions of classes and objects contain in Scala source file file. The newly added symbols replace any previously entered symbols. If typeCheck = true, also run typer on the compilation unit.

[+] def printSummary ( ) : Reporter

Print summary; return # of errors encountered

[+] private def printTree ( last: PrintedTree ) ( implicit ctx: Context ) : PrintedTree
[+] override def reset ( ) : Unit
[+] protected def rootContext ( implicit ctx: Context ) : Context

Produces the following contexts, from outermost to innermost

bootStrap: A context with next available runId and a scope consisting of the RootPackage root start A context with RootClass as owner and the necessary initializations for type checking. imports For each element of RootImports, an import context

[+] def runContext : Context
[+] def units : List [ CompilationUnit ]

The compilation units currently being compiled, this may return different results over time.

[+] private def units_= ( us: List [ CompilationUnit ] ) : Unit