The table wire moved to its id-table form in #507 (docs/SPEC-TABLES.md §3): the form byte, id reference, kind, payload terminated by the zero reference, canonical LEB128 for every length, count, index and reference, sixty-four-bit identity, and the trailing id table located from the end. The C++ reference and the compiler's own engine carry it; this port still writes the previous form.
What moves
- Identity at sixty-four bits. A field's id, an enum variant's, a union arm's and a table's own name id are all
fnv1a64(name), no fold and no rebound. The reserved node-table id is 0xFFFFFFFFFFFFFFFF.
- Every number is a canonical LEB128 — length, count, index, id reference — and a non-minimal spelling is malformed. A length cannot be patched in place any more, so every body's length is measured before it rides.
- The id table. Every id the body used, once each, in first-use order over the whole wire; the body names them by 1-based reference, and reference
0 names no id. It is the last thing in the file and a reader finds it from the END: the final eight bytes are the entry count, a fixed little-endian u64.
- The form byte is
1 and is read FIRST. A byte this reader does not know is a REFUSAL by name, never damage, and the read report carries a verdict beside its five counters.
- Three kinds:
30 an enum, carrying the reference to its variant name's id; 31 the escape; 32 the payload-free arm.
- An arm header is a field header and carries the arm's KIND, so a retyped arm is an ordinary kind mismatch.
- The node table rides in ONE field under the reserved id — a 64-bit
L frames a numbering of any size.
What to pass
The corpus is pinned in the new form. The five wire-carrying conformance surfaces are ABSENT for this port until the codecs move: wire, report, json-read, json-write and json-hostile — every surface whose expectation is wire bytes. Restoring them means passing, over testdata/conformance/tables/MANIFEST.txt:
- every
instance row byte for byte after a save, which holds elision, first-use order and distinctness at once;
- every
report row's five counters AND its verdict, including form_zero, form_two and form_ff (the refusal), the escape_* and nopayload_* rows (kinds 31 and 32 at every position), the a2_arm_* rows (the arm's kind byte and its length), and k1_as_k2 / k2_as_k1 (the enum kind against the raw integer);
tables-<lang>-wire-fuzz against the compiler's engine as the oracle, with the reference-class, id-table, canonical-spelling and form-byte passes §4.2 names.
Part of #349 and #435. PORTING.md carries the cell.
The table wire moved to its id-table form in #507 (docs/SPEC-TABLES.md §3): the form byte,
id reference, kind, payloadterminated by the zero reference, canonical LEB128 for every length, count, index and reference, sixty-four-bit identity, and the trailing id table located from the end. The C++ reference and the compiler's own engine carry it; this port still writes the previous form.What moves
fnv1a64(name), no fold and no rebound. The reserved node-table id is0xFFFFFFFFFFFFFFFF.0names no id. It is the last thing in the file and a reader finds it from the END: the final eight bytes are the entry count, a fixed little-endian u64.1and is read FIRST. A byte this reader does not know is a REFUSAL by name, never damage, and the read report carries a verdict beside its five counters.30an enum, carrying the reference to its variant name's id;31the escape;32the payload-free arm.Lframes a numbering of any size.What to pass
The corpus is pinned in the new form. The five wire-carrying conformance surfaces are ABSENT for this port until the codecs move:
wire,report,json-read,json-writeandjson-hostile— every surface whose expectation is wire bytes. Restoring them means passing, overtestdata/conformance/tables/MANIFEST.txt:instancerow byte for byte after a save, which holds elision, first-use order and distinctness at once;reportrow's five counters AND its verdict, includingform_zero,form_twoandform_ff(the refusal), theescape_*andnopayload_*rows (kinds 31 and 32 at every position), thea2_arm_*rows (the arm's kind byte and its length), andk1_as_k2/k2_as_k1(the enum kind against the raw integer);tables-<lang>-wire-fuzzagainst the compiler's engine as the oracle, with the reference-class, id-table, canonical-spelling and form-byte passes §4.2 names.Part of #349 and #435. PORTING.md carries the cell.