Function sequant::eval::table_read

Function Documentation

inline TableRead sequant::eval::table_read(CellRegistry &reg, CellId source)

The ownership half of one table-driven read of source: spend one life of source in reg and report whether that read spent the cell’s last life. CellReadResolver::fetch calls it for a consumer’s operand reads; an Assemble step reads its production.source through CellRegistry::read directly, for the same accounting. A read served from somewhere other than the registry would still owe the table that life: skipping it leaves the source holding a fully consumed buffer, which pins the memory and makes every later reader see the value as shared.

CellReadResolver::fetch does not consult TableRead::exhausted itself (CellReadResolver::operand_drained re-derives in-place eligibility straight from CellRegistry::drained instead); an Assemble step does, to decide whether the partial it just read is its own to accumulate into (see CellRegistry::read's overload).