Skip to main content

Module tile_render

Module tile_render 

Source
Expand description

The tile nodes (SRD 114 §6, §7.1).

The compiler lowers a tile statement to one tile_encode binding per hole and one tile_render binding for the tile. tile_encode takes the hole’s value on a polymorphic wire and produces the encoded text for the hole’s position under the tile’s encoding, its declared or observed type, its format, and its raw flag. Encoding is therefore an ordinary node on the graph, visible to provenance and to the engines. tile_render then concatenates static runs with encoded holes, selects branches, and re-runs projection bodies per tuple over a scratch state, using a skeleton it parses once at setup.

Structs§

BodyKernels
The kernels one rendering state keeps over its projection bodies: one per body program and engine, created on the first render that reaches the body and reused by every render after, so a projection creates nothing per tuple. A tile render node owns one of these in its scratch (axiom S3): the storage belongs to the state that renders, never to the node, which every state of the program shares. A clone is empty, since a clone of a state is a new state.
ChildSpec
A projection body: a program compiled once at setup, and the outer wires it imports from the render node’s inputs, each with the type its extern declares so the transported text can be re-typed.
HoleEncoding
The encoder for one hole, carried as the tile_encode node’s spec. Serialized compactly as encoding|position|type|format|flags.
TileEncode
Encode one hole’s value per its spec (encoding|position|type|format|flags). Authors do not call this directly; the compiler emits it for each hole.
TileProgram
The runtime form: the spec, compiled body programs, and parsed streams.
TileRender
Render a compiled tile skeleton over its encoded hole texts. Authors do not call this directly; the compiler emits it for tile statements.
TileSpec
The serialized skeleton.

Enums§

HolePosition
Where a hole sits in a json skeleton, which decides its encoding.
HoleSource
Where a hole’s encoded text comes from at render time.
TileOp
One skeleton instruction. Holes are values, encoded at the hole.

Functions§

encode
Encode one value per a hole’s encoding, into any text sink.
encode_ref
Encode a borrowed view of a value (SRD 115 §6.1): the compiled helper calls this on its slot without owning a Value, and a string hole is encoded from the arena in place.