Dotty Documentation

0.5.0-bin-SNAPSHOT

class Scala2Unpickler
extends PickleBuffer with Embedded

Unpickle symbol table information descending from a class and/or module root from an array of bytes.

[-] Constructors

Scala2Unpickler ( bytes: Array [ Byte ] , classRoot: ClassDenotation , moduleClassRoot: ClassDenotation )
Scala2Unpickler ( ictx: Context )

[-] Members

[+] class ClassUnpickler
[+] class LocalUnpickler
[+] private val bytes : Array [ Byte ]
[+] private val classRoot : ClassDenotation
[+] private val entries : Array [ AnyRef ]

A map from entry numbers to symbols, types, or annotations

[+] private val ictx : Context
[+] private val index : Array [ Int ]

A map from entry numbers to array offsets

[+] private val loadingMirror : Definitions
[+] private val moduleClassRoot : ClassDenotation
[+] val moduleRoot : SymDenotation
[+] private val symScopes : AnyRefMap [ Symbol, Scope ]

A map from symbols to their associated decls scopes

[+] protected def at ( i: Int , op: () => T ) : T

If entry at i is undefined, define it by performing operation op with readIndex at start of i'th entry. Restore readIndex afterwards.

[+] protected def atReadPos ( start: Int , op: () => T ) : T
[+] private def checkVersion ( implicit ctx: Context ) : Unit
[+] protected def deferredAnnot ( end: Int ) ( implicit ctx: Context ) : Annotation

A deferred annotation that can be completed by reading the bytes between readIndex and end.

[+] def elimExistentials ( boundSyms: List [ Symbol ] , tp: Type ) ( implicit ctx: Context ) : Type

Convert tp { type name = sym } forSome { sym >: L <: H } to tp { name >: L <: H } and tp { name: sym } forSome { sym <: T with Singleton } to tp { name: T }

[+] protected def errorBadSignature ( msg: String , original: Option [ RuntimeException ] ) ( implicit ctx: Context ) : Nothing
[+] protected def handleRuntimeException ( ex: RuntimeException ) ( implicit ctx: Context ) : Nothing
[+] protected def isChildrenEntry ( i: Int ) : Boolean

Does the entry represent children of a symbol?

[+] protected def isLocal ( sym: Symbol ) ( implicit ctx: Context ) : Boolean
[+] protected def isNameEntry ( i: Int ) : Boolean

Does entry represent a name?

[+] protected def isRefinementClass ( sym: Symbol ) ( implicit ctx: Context ) : Boolean
[+] protected def isRefinementSymbolEntry ( i: Int ) ( implicit ctx: Context ) : Boolean

Does entry represent a refinement symbol? pre: Entry is a class symbol

[+] protected def isSymbolAnnotationEntry ( i: Int ) : Boolean

Does entry represent a symbol annotation?

[+] protected def isSymbolEntry ( i: Int ) ( implicit ctx: Context ) : Boolean

Does entry represent an (internal) symbol

[+] protected def isSymbolRef ( i: Int ) : Boolean

Does entry represent an (internal or external) symbol

[+] protected def isUnpickleRoot ( sym: Symbol ) ( implicit ctx: Context ) : Boolean
[+] def noSuchConstantTag ( tag: Int , len: Int ) ( implicit ctx: Context ) : Constant
[+] def noSuchTreeTag ( tag: Int , end: Int ) ( implicit ctx: Context ) : Nothing
[+] def noSuchTypeTag ( tag: Int , end: Int ) ( implicit ctx: Context ) : Type
[+] protected def readAnnotArg ( i: Int ) ( implicit ctx: Context ) : Tree

Read an annotation argument, which is pickled either as a Constant or a Tree.

[+] private def readAnnotInfoArg ( ) ( implicit ctx: Context ) : Tree
[+] protected def readAnnotation ( ) ( implicit ctx: Context ) : Annotation

Read an annotation and return it. Used when unpickling an ANNOTATED(WSELF)tpe or a NestedAnnotArg

[+] protected def readAnnotationContents ( end: Int ) ( implicit ctx: Context ) : Tree

Read an annotation's contents. Not to be called directly, use readAnnotation, readSymbolAnnotation, or readAnnotInfoArg

[+] protected def readAnnotationRef ( ) ( implicit ctx: Context ) : Annotation
[+] private def readArrayAnnotArg ( ) ( implicit ctx: Context ) : Tree

Read a ClassfileAnnotArg (argument to a classfile annotation)

[+] protected def readCaseDefRef ( ) ( implicit ctx: Context ) : CaseDef
[+] protected def readChildren ( ) ( implicit ctx: Context ) : Unit

Read children and store them into the corresponding symbol.

[+] protected def readClassfileAnnotArg ( i: Int ) ( implicit ctx: Context ) : Tree
[+] protected def readConstant ( ) ( implicit ctx: Context ) : Constant
[+] protected def readConstantRef ( ) ( implicit ctx: Context ) : Constant
[+] protected def readDisambiguatedSymbol ( p: Symbol => Boolean ) ( ) ( implicit ctx: Context ) : Symbol

Read a symbol, with possible disambiguation

[+] protected def readDisambiguatedSymbolRef ( p: Symbol => Boolean ) ( implicit ctx: Context ) : Symbol
[+] protected def readIdentRef ( ) ( implicit ctx: Context ) : Ident
[+] def readModifiers ( isType: Boolean ) ( implicit ctx: Context ) : Modifiers
[+] protected def readModifiersRef ( isType: Boolean ) ( implicit ctx: Context ) : Modifiers
[+] protected def readName ( ) ( implicit ctx: Context ) : Name

Read a name

[+] protected def readNameRef ( ) ( implicit ctx: Context ) : Name
[+] protected def readSymbol ( ) ( implicit ctx: Context ) : Symbol

Read a symbol

[+] protected def readSymbolAnnotation ( ) ( implicit ctx: Context ) : Unit

Read an annotation and as a side effect store it into the symbol it requests. Called at top-level, for all (symbol, annotInfo) entries.

[+] protected def readSymbolRef ( ) ( implicit ctx: Context ) : Symbol
[+] protected def readTemplateRef ( ) ( implicit ctx: Context ) : Template
[+] protected def readTermName ( ) ( implicit ctx: Context ) : TermName
[+] protected def readTermNameRef ( ) ( implicit ctx: Context ) : TermName
[+] protected def readTree ( ) ( implicit ctx: Context ) : Tree
[+] protected def readTreeRef ( ) ( implicit ctx: Context ) : Tree
[+] protected def readType ( ) ( implicit ctx: Context ) : Type

Read a type

[+] protected def readTypeDefRef ( ) ( implicit ctx: Context ) : TypeDef
[+] protected def readTypeName ( ) ( implicit ctx: Context ) : TypeName
[+] protected def readTypeNameRef ( ) ( implicit ctx: Context ) : TypeName
[+] def readTypeParams ( ) ( implicit ctx: Context ) : List [ Symbol ]
[+] protected def readTypeRef ( ) ( implicit ctx: Context ) : Type
[+] protected def readValDefRef ( ) ( implicit ctx: Context ) : ValDef
[+] def rootClassUnpickler ( start: Coord , cls: Symbol , module: Symbol , infoRef: Int ) : ClassUnpickler & SecondCompleter
[+] def run ( ) ( implicit ctx: Context ) : Unit
[+] def showPickled ( ) : Unit
[+] def source ( implicit ctx: Context ) : AbstractFile
[+] protected def symScope ( sym: Symbol ) : Scope

The decls scope associated with given symbol

[+] def unimplementedTree ( what: String ) ( implicit ctx: Context ) : Nothing