TreeReader

dotty.tools.dotc.core.tasty.TreeUnpickler.TreeReader
class TreeReader(val reader: TastyReader)

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def coordAt(addr: Addr)(using Context): Coord

Coordinate for the symbol at addr.

Coordinate for the symbol at addr.

Attributes

Create symbol of member definition or parameter node and enter in symAtAddr map

Create symbol of member definition or parameter node and enter in symAtAddr map

Attributes

Returns

the created symbol

def createSymbol()(using Context): Symbol

Create symbol of definition node and enter in symAtAddr map

Create symbol of definition node and enter in symAtAddr map

Attributes

Returns

the created symbol

def forkAt(start: Addr): TreeReader
def indexParams(tag: Int)(using Context): Unit

Create symbols the longest consecutive sequence of parameters with given tag starting at current address.

Create symbols the longest consecutive sequence of parameters with given tag starting at current address.

Attributes

def indexStats(end: Addr)(using Context): FlagSet

Create symbols for the definitions in the statement sequence between current address and end.

Create symbols for the definitions in the statement sequence between current address and end.

Attributes

Returns

the largest subset of {NoInits, PureInterface} that a trait owning the indexed statements can have as flags.

Create symbols for all type and value parameters of template starting at current address.

Create symbols for all type and value parameters of template starting at current address.

Attributes

def isAbstractType(name: Name)(using Context): Boolean
def isTopLevel(using Context): Boolean

The next tag, following through SHARED tags

The next tag, following through SHARED tags

Attributes

def processPackage[T](op: (RefTree, Addr) => Context ?=> T)(using Context): T

Process package with given operation op. The operation takes as arguments

Process package with given operation op. The operation takes as arguments

  • a RefTree representing the pid of the package,
  • an end address,
  • a context which has the processed package as owner

Attributes

def readCase()(using Context): CaseDef
def readCases(end: Addr)(using Context): List[CaseDef]
def readConstant(tag: Int)(using Context): Constant
def readHole(end: Addr, isTerm: Boolean)(using Context): Tree
inline def readImportOrExport(inline mkTree: (Tree, List[ImportSelector]) => Tree)()(using Context): Tree
def readIndexedDef()(using Context): Tree

If definition was already read by a completer, return the previously read tree or else read definition.

If definition was already read by a completer, return the previously read tree or else read definition.

Attributes

def readIndexedParams[T <: MemberDef](tag: Int)(using Context): List[T]
def readIndexedStat(exprOwner: Symbol)(using Context): Tree
def readIndexedStats[T](exprOwner: Symbol, end: Addr, k: (List[Tree], Context) => T)(using Context): T
def readLater[T <: AnyRef](end: Addr, op: TreeReader => Context ?=> T)(using Context): Lazy[T]
def readLaterWithOwner[T <: AnyRef](end: Addr, op: TreeReader => Context ?=> T)(using Context): Symbol => Lazy[T]
def readModifiers(end: Addr)(using Context): (FlagSet, List[Symbol => Annotation], Symbol)

Read modifier list into triplet of flags, annotations and a privateWithin boundary symbol.

Read modifier list into triplet of flags, annotations and a privateWithin boundary symbol.

Attributes

def readParamNamesAndMods(end: Addr): (List[Name], FlagSet)

Read names in an interleaved sequence of types/bounds and (parameter) names, possibly followed by a sequence of modifiers.

Read names in an interleaved sequence of types/bounds and (parameter) names, possibly followed by a sequence of modifiers.

Attributes

def readParamTypes[T <: Type](n: Int)(using Context): List[T]

Read n parameter types or bounds which are interleaved with names

Read n parameter types or bounds which are interleaved with names

Attributes

def readParams[T <: MemberDef](tag: Int)(using Context): List[T]
def readParents(withArgs: Boolean)(using Context): List[Tree]

Read template parents

Read template parents

Value parameters

withArgs

if false, only read enough of parent trees to determine their type but skip constructor arguments. Return any trees that were partially parsed in this way as InferredTypeTrees.

Attributes

def readStats[T](exprOwner: Symbol, end: Addr, k: (List[Tree], Context) => T)(using Context): T
def readSymRef()(using Context): Symbol

Read reference to definition and return symbol created at that definition

Read reference to definition and return symbol created at that definition

Attributes

def readTopLevel()(using Context): List[Tree]
def readTpt()(using Context): Tree
def readTree()(using Context): Tree
def readTreeRef()(using Context): TermRef
def readType()(using Context): Type

Read a type

Read a type

Attributes

def readTypeRef(): Type

Record all directly nested definitions and templates in current tree as OwnerTrees in buf. A complication concerns member definitions. These are lexically nested in a Template node, but need to be listed separately in the OwnerTree of the enclosing class in order not to confuse owner chains.

Record all directly nested definitions and templates in current tree as OwnerTrees in buf. A complication concerns member definitions. These are lexically nested in a Template node, but need to be listed separately in the OwnerTree of the enclosing class in order not to confuse owner chains.

Attributes

def scanTrees(buf: ListBuffer[OwnerTree], end: Addr, mode: MemberDefMode): Unit

Record all directly nested definitions and templates between current address and end as OwnerTrees in buf

Record all directly nested definitions and templates between current address and end as OwnerTrees in buf

Attributes

def setSpan[T <: Tree](addr: Addr, tree: T)(using Context): tree.type

Set position of tree at given addr.

Set position of tree at given addr.

Attributes

def skipParams(): Unit
def skipToplevel()(using Context): Unit
def skipTree(tag: Int): Unit
def skipTree(): Unit
def sourceChangeContext(addr: Addr)(using Context): Context

If currentAddr carries a source path, the current context with the source of that path, otherwise the current context itself.

If currentAddr carries a source path, the current context with the source of that path, otherwise the current context itself.

Attributes

def sourcePathAt(addr: Addr)(using Context): String

Pickled source path at addr.

Pickled source path at addr.

Attributes

def spanAt(addr: Addr)(using Context): Span

Pickled span for addr.

Pickled span for addr.

Attributes

def symbolAt(addr: Addr)(using Context): Symbol

The symbol at given address; create a new one if none exists yet

The symbol at given address; create a new one if none exists yet

Attributes

The symbol defined by current definition

The symbol defined by current definition

Attributes

Concrete fields

val reader: TastyReader