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§
- Body
Kernels - 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.
- Child
Spec - 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.
- Hole
Encoding - The encoder for one hole, carried as the
tile_encodenode’s spec. Serialized compactly asencoding|position|type|format|flags. - Tile
Encode - 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. - Tile
Program - The runtime form: the spec, compiled body programs, and parsed streams.
- Tile
Render - Render a compiled tile skeleton over its encoded hole texts. Authors
do not call this directly; the compiler emits it for
tilestatements. - Tile
Spec - The serialized skeleton.
Enums§
- Hole
Position - Where a hole sits in a
jsonskeleton, which decides its encoding. - Hole
Source - 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
closure calls this on its slot without owning a
Value, and a string hole is encoded from its producer’s scratch in place.