MakeInlineableMap

abstract class MakeInlineableMap(val inlineSym: Symbol) extends TreeMap with Insert

A tree map which inserts accessors for non-public term members accessed from inlined code.

trait Insert
class TreeMap
class Object
trait Matchable
class Any

Value members

Abstract methods

def preTransform(tree: Tree)(using Context): Tree

Concrete methods

def accessorNameOf(name: TermName, site: Symbol)(using Context): TermName
def needsAccessor(sym: Symbol)(using Context): Boolean

A definition needs an accessor if it is private, protected, or qualified private and it is not part of the tree that gets inlined. The latter test is implemented by excluding all symbols properly contained in the inline method.

A definition needs an accessor if it is private, protected, or qualified private and it is not part of the tree that gets inlined. The latter test is implemented by excluding all symbols properly contained in the inline method.

Constant vals don't need accessors since they are inlined in FirstTransform. Inline methods don't need accessors since they are inlined in Typer.

def postTransform(tree: Tree)(using Context): Tree
override def transform(tree: Tree)(using Context): Tree
Definition Classes

Inherited methods

def accessorIfNeeded(tree: Tree)(using Context): Tree

Replace tree with a reference to an accessor if needed

Replace tree with a reference to an accessor if needed

Inherited from
Insert
protected def accessorSymbol(owner: Symbol, accessorName: TermName, accessorInfo: Type, accessed: Symbol)(using Context): Symbol

An accessor symbol, create a fresh one unless one exists already

An accessor symbol, create a fresh one unless one exists already

Inherited from
Insert
def ifNoHost(reference: RefTree)(using Context): Tree
Inherited from
Insert
def transform(trees: List[Tree])(using Context): List[Tree]
Inherited from
TreeMap
Inherited from
TreeMap
Inherited from
TreeMap
def transformStats(trees: List[Tree], exprOwner: Symbol)(using Context): List[Tree]
Inherited from
TreeMap
def transformSub[Tr <: Tree](trees: List[Tr])(using Context): List[Tr]
Inherited from
TreeMap
def transformSub[Tr <: Tree](tree: Tr)(using Context): Tr
Inherited from
TreeMap
def useAccessor(reference: RefTree)(using Context): Tree

Create an accessor unless one exists already, and replace the original access with a reference to the accessor.

Create an accessor unless one exists already, and replace the original access with a reference to the accessor.

Value Params
onLHS

The reference is on the left-hand side of an assignment

reference

The original reference to the non-public symbol

Inherited from
Insert
def useSetter(getterRef: Tree)(using Context): Tree

Given a reference to a getter accessor, the corresponding setter reference

Given a reference to a getter accessor, the corresponding setter reference

Inherited from
Insert

Concrete fields

Inherited fields

Inherited from
TreeMap