cli: lower unary spines and mark storage iteratively
This commit is contained in:
1 parent
c36b269289
commit
dd73b84085
8 files changed
+762
-141
No files matched your search
@@ -61,13 +61,76 @@ suite passes 312 checks; the formatter suite passes 6,078 checks over 1,469 file
|
||||
These are compiler regressions, not a model-capability measurement or full GC
|
||||
validation.
|
||||
|
||||
## Unary lowering and addressability continuations
|
||||
|
||||
Direct `.not`, `.neg`, `.deref` and `.cast` operand descent now records explicit
|
||||
lowering continuations. Negative zero constants still precede their operands;
|
||||
loads, boolean operations, checked subtraction and casts resume afterwards.
|
||||
The special negative-literal magnitude rule remains separate, including
|
||||
`-128i8` and the overflow from negating that value. Cast target validation still
|
||||
precedes operand lowering; narrowing advice, atomic-load E4202 and operand
|
||||
type/failure positions are unchanged. `peekType` skips a leading negation spine
|
||||
without allocating; other recursive query paths are outside this repair.
|
||||
|
||||
The first intermediate full 16,384-prefix check exposes another native-stack
|
||||
failure, in the preliminary `markExpr` walk, before the new expression handler
|
||||
is reached. Its record/frame excerpt is retained as
|
||||
`source-address-mark-before.json`. Addressability now uses a separate worklist
|
||||
for blocks, statements, expressions, roots and pending sibling slices. It
|
||||
preserves root-bound-before-base order, left/right and statement/tail order,
|
||||
callee/argument order and the final split_at root visit. The old skipped select
|
||||
and lock-place inputs stay skipped; storage policy is not extended here.
|
||||
|
||||
Both worklists are host metadata, released on error/completion; finished values
|
||||
and addressability facts retain their caller-arena lifetime. OOM propagates
|
||||
without a source diagnostic or public partial AIR. The verifier's load/borrow,
|
||||
initialization and atomic-access rules, runtime operations, ownership, lexical
|
||||
ends, effects and source/AIR formats are unchanged. Borrowed scalar reads remain
|
||||
valid; slice/array dereference and implicit atomic reads retain their existing
|
||||
E7006/E4202 failures. No acceptance limit, code, feature or bundle text is added.
|
||||
|
||||
An independent old unary derivation checks 3,072 shallow context combinations,
|
||||
including divergent operands, signed boundaries, borrowed/atomic values and
|
||||
invalid targets. It compares values, complete instruction/span/constant records,
|
||||
names/counters and diagnostics. It shares the unchanged non-unary handlers and
|
||||
query implementation, so it is not an independent oracle for those paths.
|
||||
Separate 32,768-node cases inspect inside-out boolean/cast spans, outside-in
|
||||
negative zeros and inside-out subtractions, and inner dereference rejection.
|
||||
The allocation test fails every arena backing request and compares complete
|
||||
emitted instruction prefixes, no output publication and full arena release.
|
||||
|
||||
An independent old addressability walk compares 17 shallow fixtures, including
|
||||
roots/bounds, branches, aggregates, calls, loops, scopes and skipped inputs.
|
||||
32,768 mixed expression/block levels and every failing backing allocation are
|
||||
tested separately. Full generated checks/lowerings now accept 65,536 typed
|
||||
scalar boolean/negative/cast nodes, with independently counted instructions;
|
||||
direct malformed dereference spines reject E7005 at their inner position.
|
||||
These do not prove that every expression/query path is bounded.
|
||||
|
||||
The permanent `source_expression_depth.py` CI suite checks deep full lowering,
|
||||
exact instruction counts, source/AIR and hosted results, fuel boundaries and
|
||||
signed-minimum overflow. Baseline/current runtime records match exactly in 47
|
||||
deterministic/hosted pairs. Full ordinary conformance passes 1,793 unique cases
|
||||
with exact corpus coverage; units and Zig format checks pass. Q-060's full
|
||||
per-step validation remains separate.
|
||||
|
||||
Final CLI validation passes 114 expression-depth checks, 635 non-value operand
|
||||
checks, 33 atomic-access checks, 312 grammar checks and the existing 6,078
|
||||
formatter checks. All 1,423 public source checks and 506 successful lowerings
|
||||
retain byte-identical old/new results with fixed baseline/current executables.
|
||||
|
||||
## Remaining work
|
||||
|
||||
The confirmed `.not` lowering recursion remains unchanged. Other expression
|
||||
and statement paths, including parenthesized/nested primary parsing,
|
||||
`peekType`/`useIn`, generic `expression`/`walk` and lowering's other recursive
|
||||
A follow-up check of `( * … 1i64 ) as i64` at 16,384 dereferences confirms a
|
||||
native-stack abort in `peekType`, before the expected ordinary type error;
|
||||
its stdout is empty and stderr repeats the dereference-query frames. Evidence:
|
||||
`unary-cast-deref-query-16384.json/.stdout/.stderr`. General query continuation
|
||||
work is still needed, beyond the negation-spine shortcut above.
|
||||
|
||||
Other expression and statement paths, including parenthesized/nested primary
|
||||
parsing, `useIn`, generic `expression`/`walk` and lowering's other recursive
|
||||
expression/block handlers, need separate probes and repairs. Their complete
|
||||
depth behavior is unverified here. The formatter's expression-marking traversal
|
||||
already uses a worklist, as inspected and exercised by the deep syntax-only
|
||||
probes. Q-061 and Phase 6 remain open; Q-060's unfinished full GC validation is
|
||||
independent. No fresh Claude review covers this parser increment.
|
||||
independent. No fresh Claude review covers these expression increments.
|
||||
Reference in new issue
Block a user