Package com.google.turbine.binder.env
Interface Env<S extends Symbol,V>
-
- All Known Implementing Classes:
CompoundEnv,LazyEnv,SimpleEnv
public interface Env<S extends Symbol,V>An environment that mapsSymbolsSto bound nodesV.For example,
BoundClassrepresents superclasses as aClassSymbol, which only contains the binary name of the type. To get theBoundClassfor that supertype, anEnv<BoundClass>is used.The indirection through env makes it possible to represent a graph with cycles using immutable nodes, and makes it easy to reason about the information produced and consumed by each pass.
TODO(cushon): keep an eye on the cost of indirections, and consider caching lookups in bound nodes if it looks like it would make a difference.
-
-
Method Summary
All Methods Instance Methods Abstract Methods Default Methods Modifier and Type Method Description @Nullable Vget(S sym)Returns the information associated with the given symbol in this environment.default VgetNonNull(S sym)
-