cli: lower enum payloads iteratively
This commit is contained in:
1 parent
8c34a4d64d
commit
627ad8f857
5 files changed
+397
-17
No files matched your search
@@ -548,3 +548,5 @@ The [ordinary-call increment](source-expression-depth-audit.md#ordinary-call-arg
|
||||
The [struct/value-field increment](source-expression-depth-audit.md#struct-construction-and-value-field-continuations) preserves declaration-order initializer checks, receiver lookup and deferred annotation queries, nominal/static/slice length rules, loans and host OOM. Independent shallow/deep comparisons, output-arena failure cleanup, exact ordinary conformance coverage and public CLI parity pass. The former struct/field abort is repaired; at that checkpoint nested array literals still aborted at 4,096 before and after. Remaining array/variant/place/control callbacks and liveness/read/assignment walks keep Q-061 open. No semantic or new depth limit changes are made. Independent read-only Claude core/follow-up reviews found no concrete defects, without running tests or establishing whole-Q-061 completion.
|
||||
|
||||
The [array-continuation increment](source-expression-depth-audit.md#array-list-and-repetition-continuations) preserves list inference/consumption/check priority, repetition bounds/Copy rules, emission/loans and host OOM. Independent comparisons and deep sibling/error/OOM tests pass; the former pure-list failure at 4,096 now accepts. Variant-payload/call alternation still aborts at 256 before and after; remaining native callbacks and liveness/read/assignment walks keep Q-061 open. No new semantic or depth limit changes. All 1,793 ordinary conformance cases, 246 focused depth CLI checks and exact public check/lower parity (1,423/506) pass. Read-only Claude core/follow-up reviews found no production defects; their fixture gaps were corrected. Whole-frontend, loop/liveness and Phase 6 completion are not established.
|
||||
|
||||
The [enum-payload increment](source-expression-depth-audit.md#enum-payload-continuations) preserves lookup/arity-before-arguments, per-payload type/consumption/check order, empty/built-in construction, spans/loans and OOM. Independent shallow/deep/sibling and direct/public allocation tests pass; exact ordinary conformance coverage and final public check/lower parity (1,423/506) pass. The former enum-payload failure at 256 is repaired; nested assert still aborts at 1,024 before and after. Scoped read-only Claude reviews found no semantic defects; 331 core and 66 final supplementary CLI checks pass. Q-061 and Phase 6 remain open, with no semantic or new depth limit change.
|
||||
@@ -656,6 +656,55 @@ variant-payload/call probes accept 16 levels but abort in `prepareCall` →
|
||||
Variant/place/builtin/control callbacks and liveness/read/assignment scans keep
|
||||
Q-061 open; Q-060 full GC validation and Phase 6 gates remain separate.
|
||||
|
||||
## Enum-payload continuations
|
||||
|
||||
Enum payloads now share the scalar/call/struct/array/value-field driver.
|
||||
Enum/variant lookup and arity still precede arguments. Each payload annotation
|
||||
is resolved immediately before its consuming-name check and evaluation; exact
|
||||
type checking precedes the next payload. Argument order, names, CFG, spans,
|
||||
loans and delayed `enum.make` are preserved (spec 15 §5, §16). Built-in errors
|
||||
and empty named variants finish immediately. A narrow private `VariantDispatch`
|
||||
is widened explicitly at the call boundary. Queued states are stable caller-
|
||||
arena allocations; their backing remains until arena destruction, including
|
||||
on errors. Host OOM propagates without language diagnostics or public partial
|
||||
AIR. No normative/format/feature/code/bundle/limit or ownership/runtime change.
|
||||
|
||||
The copied old constructor joins the shallow recursive oracle, passing 720
|
||||
comparisons including lookup/arity priority, linear transfers, borrow/bytes,
|
||||
boolean CFG, arrays and failure after a consumed argument. Type/emission/place
|
||||
helpers and non-operand leaves remain shared. Deep tests cover 32,768 variant/
|
||||
call levels with one or two payloads, exact sibling and constructor spans/order;
|
||||
recovering direct/public and persistent backing failures cover nonempty,
|
||||
empty and built-in constructors, arena cleanup and no swallowed allocation.
|
||||
|
||||
Build/units/format and both initial/final ordinary conformance runs pass with
|
||||
exact coverage of all 1,793 cases (`variant-continuations-conformance-final.jsonl`
|
||||
and its audit). Targeted error/generic/linear/nonvalue/inferred-content/
|
||||
independent-error suites pass 26/42/49/635/302/234 checks; error/generic suites
|
||||
are repeated on the final binary. Final public check/lower outputs are exact
|
||||
(1,423/506; `variant-continuations-public-parity-final.json`). Nine bounded
|
||||
assert/block/if comparisons remain exact through 256, without a frame-size
|
||||
claim. The former enum-payload abort at 256 now accepts through 16,384.
|
||||
|
||||
The frozen initial core passes 331 focused depth CLI checks: ordinary/two/
|
||||
generic chains accept through 65,536, mixed scalar/struct chains through
|
||||
32,768. At 65,536 mixed levels the existing instruction limit reports E5101,
|
||||
`max: 262144`, `found: 458754`. Exact bounded fuel/values, AIR and formatter
|
||||
parity, and deep lookup/arity error records are checked. Final supplemental mismatch/empty-constructor checks pass 66 cases
|
||||
(`variant-continuations-supplemental-depth.log`), including exact type-error
|
||||
positions and empty-leaf checking/formatting through 65,536 with bounded
|
||||
values/fuel/AIR parity. Pure recursive-type construction, loop/liveness and
|
||||
arbitrary native callbacks are not established.
|
||||
|
||||
Read-only Claude core/follow-up reviews found no semantic defects
|
||||
(`/tmp/aji-variant-continuations-review.md` and
|
||||
`/tmp/aji-variant-continuations-followup-review.md`). Comments/dispatch and
|
||||
fixture gaps were corrected; direct borrow/bytes, deep type-error and empty
|
||||
CLI cases follow the review. Neither reviewer ran tests. Separate nested-assert
|
||||
probes still abort at 1,024 before and after (`variant-followup-assert-probes.json`),
|
||||
in `prepareCall` → `expr`. Builtin/place/control callbacks and liveness/read/
|
||||
assignment walks keep Q-061 open; Q-060 full GC and Phase 6 gates remain separate.
|
||||
|
||||
## Remaining work
|
||||
|
||||
Follow-up checks accept 16 parenthesized/mixed-call levels but abort
|
||||
@@ -670,7 +719,7 @@ includes a confirmed lowerer failure and inspection-only risks:
|
||||
| Production path | Evidence and next scope |
|
||||
|---|---|
|
||||
| Parser `ifExpr`, block/statement and match/arm expression entry | Native callback re-entry remains. Bounded block/if regression probes above pass; arbitrary and alternating control/statement depth is unverified. |
|
||||
| Lowerer non-scalar `expr` callbacks: builtin/variant calls, fields/indices/places, arrays/structs, if/match/arms and blocks/statements | Ordinary calls, struct/value-field and array descent are repaired above. Variant-payload/call alternation still aborts at 256 in both binaries. Other callback depth remains unverified; include alternating scalar/non-scalar expressions. |
|
||||
| Lowerer non-scalar `expr` callbacks: builtin/variant calls, fields/indices/places, arrays/structs, if/match/arms and blocks/statements | Ordinary calls, struct/value-field, array and enum-payload descent are repaired above. Nested assert lowering still aborts at 1,024 in both binaries. Other callback depth remains unverified; include alternating scalar/non-scalar expressions. |
|
||||
| Lowerer use-after-region/liveness and assignment scans (`After`, first-use/read scans, `blockAssigns`/`stmtAssigns`/`exprAssigns`, match/select helpers) | Recursive AST walks inspected; audit their callers and finite deep inputs separately. |
|
||||
|
||||
The formatter's expression-marking traversal already uses a worklist, as
|
||||
@@ -679,5 +728,5 @@ claim every listed callback fails, or that all other paths have been cleared.
|
||||
Q-061 and Phase 6 remain open; Q-060's unfinished full GC validation is
|
||||
independent. The five reviewed increments now have a scoped external review;
|
||||
the host-OOM follow-up and intermediate repairs have no separate review.
|
||||
The struct/value-field and array increments have the scoped reviews recorded
|
||||
above.
|
||||
The struct/value-field, array and enum-payload increments have the scoped
|
||||
reviews recorded above.
|
||||
@@ -695,3 +695,16 @@ alternation still aborts at 256 before and after. Focused depth CLI checks
|
||||
core/follow-up reviews found no production defects; fixture gaps were corrected.
|
||||
Q-061, Q-060 and Phase 6 remain open;
|
||||
no normative/format/feature/code/bundle/limit or ownership/runtime change.
|
||||
|
||||
### Enum-payload depth increment
|
||||
|
||||
The [Q-061 enum increment](../design/source-expression-depth-audit.md#enum-payload-continuations)
|
||||
shares payloads with scalar/call/aggregate continuations, preserving lookup,
|
||||
arity, annotation/consumption/check order, spans, loans, empty/built-in rules
|
||||
and OOM. Independent comparisons (720), deep sibling and allocator tests,
|
||||
build/units/format, exact final conformance coverage and public check/lower
|
||||
parity pass. Scoped Claude reviews found no semantic defects. The former
|
||||
256-level abort is repaired; nested assert still aborts at 1,024 before and
|
||||
after. Initial focused CLI checks (331) and final supplementary checks (66)
|
||||
pass. Q-061, Q-060 and Phase 6 remain open. No normative/format/feature/
|
||||
code/bundle/limit or ownership/runtime change.
|
||||
Reference in new issue
Block a user