mirror of
https://github.com/vercel-labs/scriptc.git
synced 2026-11-01 07:33:12 +08:00
A checked conversion can answer a record view: an object of the target record type whose fields live in the record it views, at that record's offsets (record-views.ts). An integer clone read the fields of a borrowed record at its own shape's offsets, so for a view it read the view's unused slots and returned wrong results. Record shapes that may be views are no longer references a clone reads, so functions that read them keep the ordinary body, which reads a view's fields through the original record. The emitter now plans integer clones after record views. integer-recursion-records.ts gains a recursive sum over a view.