Dotty Documentation

0.1.1-bin-SNAPSHOT

object Inliner

[-] Constructors

[-] Members

[+] private def bodyAndAccessors ( sym: SymDenotation ) ( implicit ctx: Context ) : ( Tree, List [ MemberDef ] )
[+] def bodyToInline ( sym: SymDenotation ) ( implicit ctx: Context ) : Tree

The body to inline for method sym.

[+] def dropInlined ( inlined: Inlined ) ( implicit ctx: Context ) : Tree

Replace Inlined node by a block that contains its bindings and expansion

[+] def hasBodyToInline ( sym: SymDenotation ) ( implicit ctx: Context ) : Boolean

sym has an inline method with a known body to inline (note: definitions coming from Scala2x class files might be @inline, but still lack that body.

[+] def inlineCall ( tree: Tree , pt: Type ) ( implicit ctx: Context ) : Tree

Try to inline a call to a @inline method. Fail with error if the maximal inline depth is exceeded.

[+] private def makeInlineable ( tree: Tree ) ( implicit ctx: Context ) : Tree

Adds accessors for all non-public term members accessed from tree. Non-public type members are currently left as they are. This means that references to a private type will lead to typing failures on the code when it is inlined. Less than ideal, but hard to do better (see below).

[+] private def qualifier ( tree: Tree ) ( implicit ctx: Context ) : Tree [ Type ]

The qualifier part of a Select or Ident. For an Ident, this is the This of the current class. (TODO: use elsewhere as well?)

[+] def registerInlineInfo ( sym: SymDenotation , treeExpr: Context => Tree ) ( implicit ctx: Context ) : Unit

Register inline info for given inline method sym.

[+] def removeInlineAccessors ( sym: SymDenotation ) ( implicit ctx: Context ) : List [ MemberDef ]

The accessors to non-public members needed by the inlinable body of sym. These accessors are dropped as a side effect of calling this method.