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§
- 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: what the renderer applies at the hole,
and what the
tile_encodenode takes as its spec. Serialized compactly asencoding|position|type|format|flags. - Tile
Encode - Encode one value under a hole’s spec
(
encoding|position|type|format|flags). - 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.
- 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 (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.