pub struct EnvNode {
pub parent: EnvId,
pub val: V,
pub len: u32,
pub open: bool,
pub frame: bool,
pub live: u64,
pub dense: bool,
pub pmask: u64,
pub pres: u32,
pub wide: u32,
pub lsub: SubstId,
}Expand description
An environment node: either one entry consed onto a parent environment, or a frame — a
pruned environment of len entries holding only the entries an expression can see, stored
contiguously from val (an index into the frame slots). A narrow frame (every live index
below 64) finds an entry by its rank in live; a wide frame keeps its live indices as a
sorted list (wide, an index into the wide-index table) and finds an entry by search.
Every environment also carries the universe substitution its terms are read under (lsub):
a universe-polymorphic constant’s type and body are evaluated from its own terms, under the
substitution of one use’s levels for its parameters, without building an instantiated copy.
An extension inherits its parent’s; the empty environment of each substitution is its base.
Fields§
§parent: EnvId§val: V§len: u32§open: bool§frame: bool§live: u64Which of the innermost 64 entries are not DEAD.
dense: boolNo entry at all is DEAD.
pmask: u64The last pruning of this environment: the mask asked for and the result.
pres: u32§wide: u32For a wide frame, where its index list starts in the wide-index table (count first).
lsub: SubstIdThe universe substitution this environment’s terms are read under.