Dotty Documentation


class TreeUnpickler
extends Object

Unpickler for typed trees

[-] Constructors

TreeUnpickler ( reader: TastyReader , nameAtRef: NameRef => TermName , posUnpicklerOpt: Option [ PositionUnpickler ] )

[-] Members

[+] class Completer
[+] class LazyReader
[+] class OwnerTree

A lazy datastructure that records how definitions are nested in TASTY data. The structure is lazy because it needs to be computed only for forward references to symbols that happen before the referenced symbol is created (see symbolAt). Such forward references are rare.

[+] class TreeReader
[+] private val nameAtRef : NameRef => TermName
[+] private var ownerTree : OwnerTree

The root owner tree. See OwnerTree class definition. Set by enterTopLevel.

[+] private val posUnpicklerOpt : Option [ PositionUnpickler ]
[+] private val reader : TastyReader
[+] private var roots : Set [ SymDenotation ]

The root symbol denotation which are defined by the Tasty file associated with this TreeUnpickler. Set by enterTopLevel.

[+] private var seenRoots : Set [ Symbol ]

The root symbols that are defined in this Tasty file. This is a subset of

[+] private val symAtAddr : HashMap [ Addr, Symbol ]

A map from addresses of definition entries to the symbols they define

[+] private val treeAtAddr : HashMap [ Addr, Tree ]

A temporary map from addresses of definition entries to the trees they define. Used to remember trees of symbols that are created by a completion. Emptied once the tree is inlined into a larger tree.

[+] private val typeAtAddr : HashMap [ Addr, Type ]

A map from addresses of type entries to the types they define. Currently only populated for types that might be recursively referenced from within themselves (i.e. RecTypes, LambdaTypes).

[+] def enterTopLevel ( roots: Set [ SymDenotation ] ) ( implicit ctx: Context ) : Unit

Enter all toplevel classes and objects into their scopes

[+] private def registerSym ( addr: Addr , sym: Symbol ) : Unit
[+] def unpickle ( ) ( implicit ctx: Context ) : List [ Tree ]

The unpickled trees