Env
Environment for parameters
Attributes
- Graph
-
- Supertypes
- Self type
Members list
Type members
Classlikes
Local environments can be deeply nested, therefore we need outer
.
Value members
Concrete methods
An empty environment can be used for non-method environments, e.g., field initializers.
An empty environment can be used for non-method environments, e.g., field initializers.
The owner for the local environment for field initializers is the primary constructor of the enclosing class.
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
.