pub fn carry_globals(
store: impl AsContextMut,
instance: &Instance,
symbols: &mut SymbolTable,
end: UnitEnd,
)Expand description
Takes the unit’s manifest and settles each slot it wrote: one none of whose flags is 1 never got the unit’s value and is put back as it was before the unit, a function or layout keeps the last definition that ran, and a cell that got a value carries the one its instance holds, or, when the unit trapped inside a binding of it, the one outside the binding; one only a DEFVAR of it reached stays declared special and unbound. Never fails the unit that ran: a cell that cannot be read becomes an opaque global, loud when a later unit reads it, and the cause is logged. The session heap is settled only once the unit’s instance prologue ran to its end.