Skip to main content

Module tile_render

Module tile_render 

Source
Expand description

The tile nodes (polytile.md §6, §7.1).

The compiler lowers a tile statement to one tile_render binding over the hole wires: the render node carries each hole’s encoding spec and encodes the value at the hole, 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.

tile_encode encodes one value under one hole’s spec. The compiler emitted one per hole until encoding moved into the renderer; it is a library node now, which a program may call by name and nothing generates.

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: what the renderer applies at the hole, and what the tile_encode node takes as its spec. Serialized compactly as encoding|position|type|format|flags.
TileEncode
Encode one value under a hole’s spec (encoding|position|type|format|flags).
TileProgram
The runtime form: the spec, compiled body programs, and parsed streams.
TileRender
Render a compiled tile skeleton over its encoded hole texts.
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 (compiled_handles.md §6): the compiled closure calls this on its slot without owning a Value, and a string hole is encoded from its producer’s scratch in place.