Dotty Documentation


class Compiler
extends Object

The central class of the dotc compiler. The job of a compiler is to create runs, which process given phases in a given rootContext.

[-] Constructors

Compiler ( )

[-] Members

[+] var runId : Int
[+] protected def backendPhases : List [ List [ Phase ] ]

Generate the output of the compilation

[+] protected def frontendPhases : List [ List [ Phase ] ]

Phases dealing with the frontend up to trees ready for TASTY pickling

[+] def newRun ( implicit ctx: Context ) : Run
[+] def nextRunId : Int
[+] def phases : List [ List [ Phase ] ]

Meta-ordering constraint:

DenotTransformers that change the signature of their denotation's info must go after erasure. The reason is that denotations are permanently referred to by TermRefs which contain a signature. If the signature of a symbol would change, all refs to it would become outdated - they could not be dereferenced in the new phase.

After erasure, signature changing denot-transformers are OK because erasure will make sure that only term refs with fixed SymDenotations survive beyond it. This is possible because:

  • splitter has run, so every ident or select refers to a unique symbol
  • after erasure, asSeenFrom is the identity, so every reference has a plain SymDenotation, as opposed to a UniqueRefDenotation.
[+] protected def picklerPhases : List [ List [ Phase ] ]

Phases dealing with TASTY tree pickling and unpickling

[+] def reset ( ) ( implicit ctx: Context ) : Unit
[+] def runId_= ( x$1: Int ) : Unit
[+] protected def transformPhases : List [ List [ Phase ] ]

Phases dealing with the transformation from pickled trees to backend trees