Env

dotty.tools.dotc.transform.init.Objects.Env
object Env

Environment for parameters

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any
Self type
Objects.this.Objects.this.Env.type

Members list

Type members

Classlikes

case class EnvRef(tree: Tree, owner: ClassSymbol)(using x$3: Trace) extends Scope

Represents environments for evaluating methods, functions, or lazy/by-name values For methods or closures, tree is the DefDef of the method. For lazy/by-name values, tree is the rhs of the definition or the argument passed to by-name param

Represents environments for evaluating methods, functions, or lazy/by-name values For methods or closures, tree is the DefDef of the method. For lazy/by-name values, tree is the rhs of the definition or the argument passed to by-name param

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Objects.this.Scope
class Object
trait Matchable
class Any
Show all
case class EnvSet(envs: Set[EnvRef])

Attributes

Supertypes
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Value members

Concrete methods

def ofByName(sym: Symbol, tree: Tree, thisV: Objects.this.ThisValue, outerEnv: EnvSet)(using Data, EnvMapMutableData, Trace): EnvRef

Creates an environment that evaluates a lazy val with tree as rhs or evaluates a by-name parameter where tree is the argument tree

Creates an environment that evaluates a lazy val with tree as rhs or evaluates a by-name parameter where tree is the argument tree

Attributes

def ofDefDef(ddef: DefDef, args: List[Objects.this.Value], thisV: Objects.this.ThisValue, outerEnv: EnvSet)(using Data, EnvMapMutableData, Trace): EnvRef

Creates an environment that evaluates the body of a method or the body of a closure

Creates an environment that evaluates the body of a method or the body of a closure

Attributes

Resolve the environment associated by the given method enclosing, starting from env as the innermost.

Resolve the environment associated by the given method enclosing, starting from env as the innermost.

The method could be located in outer scope with intermixed classes between its definition site and usage site.

Value parameters

enclosing

The method which owns the environment. This method is called to look up the environment owned by the enclosing method of some symbol.

scope

The scope where the local variable is referenced.

thisV

The value for this of the enclosing class where the local variable is referenced.

Attributes

Returns

the environment whose symbol == enclosing.

Resolve the environment by searching for a given symbol.

Resolve the environment by searching for a given symbol.

Searches for the environment that defines target, starting from env as the innermost.

Value parameters

scope

The scope where the local variable is referenced.

target

The symbol to search for.

thisV

The value for this of the enclosing class where the local variable is referenced.

Attributes

Returns

the environment that owns the target.

def setLocalVal(x: Symbol, value: Objects.this.Value)(using scope: Objects.this.Scope, ctx: Context, heap: MutableData, envMap: EnvMapMutableData): Unit
def setLocalVar(x: Symbol, value: Objects.this.Value)(using scope: Objects.this.Scope, ctx: Context, heap: MutableData, envMap: EnvMapMutableData): Unit
def valValue(x: Symbol)(using env: EnvRef, ctx: Context, trace: Trace, envMap: EnvMapMutableData): Objects.this.Value
def withEnv[T](env: EnvRef)(fn: EnvRef ?=> T): T

Concrete fields

val NoEnv: EnvSet