Expand description
VM-native value formatting (ADR-006 §2.7.4 — output adapter).
Formats runtime values held in a KindedSlot for print() /
format() / REPL display. The pre-bulldozer implementation keyed off
the deleted ValueWord carrier and tag_bits::* decode helpers; per
ADR-006 §2.7.4 the formatter moves to a kinded carrier — NativeKind
drives inline-scalar dispatch, and heap arms are read via
slot.as_heap_value() + HeapValue match (Q8 ruling, preserves
ADR-005 §1 single-discriminator).
PrintResult and PrintSpan live in shape_runtime::print_result
per §2.7.4; consumers of this formatter pair its output with those
span-metadata carriers when feeding the output adapter.
§Phase-1b-vm migration scope (E-printing close)
Wave 6.5 / Wave-α E-printing ports the formatter SHAPE off the
deleted ValueWord API: the public surface now takes &KindedSlot,
dispatches on NativeKind for the inline-scalar arms (Int*, UInt*,
IntSize, UIntSize, Bool, Float64), and reads heap-bearing kinds via
the typed Arc<T> payload reconstruction shared with
KindedSlot::Drop / clone_with_kind. Heap arms whose payload
formatting depends on Phase-2c surfaces (TypedObject schema lookup,
Content rendering, Temporal/DateTime formatting, TableView, Iterator
/ Generator state) surface as todo!("phase-2c — see ADR-006 §2.7.4") placeholders rather than papering over with ValueWord-shape
recovery, per the playbook’s surface-and-stop discipline.
Structs§
- Print
Result - Output of a
print()call: rendered string plus per-span metadata. - Value
Formatter - Formatter for runtime values represented as
KindedSlot.
Enums§
- Print
Span - A single span within a rendered print() output.