Expand description
The boundary marshalling a compiled node kit reads its arguments
and writes its outputs through (compiled_handles.md §4): a node
crate’s kits use it as the core’s own do.
Marshalling between typed Values and compiled-tier slots. One
place owns the rule for every port type, so embedded cones and
whole compiled kernels decode alike:
- scalars ride as their slot bits, one slot or two;
- every
Ref2kind rides as a(ptr, len)pair (jit_boundary.md, axioms S1–S10): a typed vector, a string, or a byte string as a slice of its elements, and a JSON, extension, or handle value as a one-element slice holding theValue.
Entering the compiled tier, a Value is borrowed: the pair points
into the value the caller holds for the duration of the call.
Leaving it, the pair is copied out to an owned Value: the
interpreter and the host never hold a reference into a state’s
buffers.
Functions§
- arg_ref⚠
- An argument’s slots as a borrowed view of the value, decoded by its port type: nothing is copied. A string, byte string, or value is borrowed through its pair, valid while its producer’s storage is.
- decode_
output - An output at
slotofbufferas theValueits port type names:decode_slotfor a one-slot carrier and aRef2pair, and the two-limb reassembly for a 128-bit integer or a register word, which ride two consecutive slots (alignment §6). This is the typed read every compiled kernel’sget_valuemakes.