interp: calculate runtime value sizes without recursion

This commit is contained in:
dev committed 2026-10-09 22:55:04 +03:00
1 parent f92817b127
commit 6353ab5f5d
6 files changed
+276 -5

No files matched your search

+6
View File
@@ -421,4 +421,10 @@ The [Q-060 sharing-preserving copy increment](../design/runtime-value-depth-audi
Units/format checks, test-extended and all 1,787 ordinary conformance cases pass. Per-step collection passes 57 focused run cases plus 26 phase-3 run cases with stress 16; 146 old/new mixed-value and identity/schedule records are identical. The full per-step conformance run is still running at this checkpoint. Follow-up probes independently confirm valueBytes recursion on own.new and JSON output failure at std.json.Stringify's fixed nesting stack. Q-060 and Phase 6 remain open. No fresh Claude review was available.
## P6-1 runtime value-size depth repair (2026-10-09)
The [Q-060 runtime value-size increment](../design/runtime-value-depth-audit.md#runtime-value-size-repair) replaces recursive array-value queries with a constant-state checked factor and unchanged leaf accounting. Zero-sized leaves, true overflow, maximum enum payloads and dynamic-count ordering retain their existing meanings; heap/region/graph charges and failure/release rules are unchanged. Deep verified allocation tests pin fuel 0–6 and zero/one-byte grant boundaries under ordinary/per-step collection. A nested-quota AIR/source pair checks exact charges, zero-sized contents, allocation failure and restored authority.
Units/format checks, test-extended and all 1,789 ordinary conformance cases pass; the deep allocation and new pair also pass per-step collection. Ten new-pair quota records and 426 generated allocation-oracle runs match the old interpreter exactly. The earlier full per-step collector suite remains in progress. No normative/bundle/feature/code change or accepted-depth limit; Q-060 remains open for serialization, and Phase 6/contract gates remain open. No fresh Claude review was available.
Both new copy cases also pass with collection before every instruction; their shallow sharing-preserving GC behavior is covered separately from the retained deep collector failure.