Module upvalues

Module upvalues 

Source
Expand description

This module encapsulates some logic for upvalue handling, which is relevant to both thunks (delayed computations for lazy-evaluation) as well as closures (lambdas that capture variables from the surrounding scope).

The upvalues of a scope are whatever data are needed at runtime in order to resolve each free variable in the scope to a value. “Upvalue” is a term taken from Lua.

Structs§

UpvalueData
Wrapper type to assist with assembling Upvalues. The first bit is used to signify that data for a with scope is being used, the other 63 bits define the upvalue count.
Upvalues
Structure for carrying upvalues of an UpvalueCarrier. The implementation of this struct encapsulates the logic for capturing and accessing upvalues.