Skip to content

Commit 454c50a

Browse files
olwangclaude
andcommitted
docs(selfhost): AST parity 286→339/579 (async/resource stmts + typed-let fix)
Ledger SH-025 + memory + plan refreshed for the async/resource construct sweep (manage/spawn/await, with/task_group/select) and the type-annotated-let value-split fix. AST structure parity now 339/579, 0 run-failures. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
1 parent dd57a0b commit 454c50a

2 files changed

Lines changed: 9 additions & 4 deletions

File tree

docs/ledgers/rss-selfhost-ledger.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -868,7 +868,7 @@ gap is VM value-representation / intrinsic-dispatch cost (the next big lever).
868868
across all backends; RS0037 removed as a restriction and repurposed for arity;
869869
spec §20.1 amended.
870870

871-
### SH-025 — AST-dump parity: streaming rss producer at 286/576, residual grammar is the growing tail
871+
### SH-025 — AST-dump parity: streaming rss producer at 339/579, residual grammar is the growing tail
872872

873873
- **Context:** step 2 of frontend object parity (after the AST-dump format +
874874
oracle keystone, SH-adjacent). `selfhost/astdump.rss` is a recursive-descent
@@ -900,10 +900,15 @@ gap is VM value-representation / intrinsic-dispatch cost (the next big lever).
900900
rest), **interpolated strings** (`$"…{e}…"` → String.format desugar, embedded
901901
exprs re-tokenized), and **statement_end line-continuation** (`;` terminator,
902902
`.`/`?` postfix, `| & + * / % ^` operator wrapping, generic-angle depth).
903+
Also (async/resource sweep): **`manage`/`spawn`/`await` prefix exprs**,
904+
**`with … as …`/`task_group`/`select` statements**, and a **type-annotated-let
905+
fix** (`let x: Option<Int> = …` — the value split is the first `=`, not
906+
top_assign whose `>=` guard skipped the `=` after a generic `>`).
903907
- **Milestones (each a commit + ratcheted floor):** base fns 58 → decls 121 →
904908
match 178 → generic calls 225 → closures 239 → for+literals 242 → unary/negative
905-
245 → **effect-receiver 248 → no-effect-receiver+attrs+effects+body 273 →
906-
explicit-fn+tuple/list-patterns 279 → interpolation 280 → line-continuation 286**.
909+
245 → effect-receiver 248 → no-effect-receiver+attrs+effects+body 273 →
910+
explicit-fn+tuple/list-patterns 279 → interpolation 280 → line-continuation 286 →
911+
**manage/spawn/await+with/task-group/select 331 → typed-let fix 339**.
907912
- **Residual (the tail):** **protocols/impls/native-modules** — DEFERRED: needs a
908913
two-pass driver (items in source order, then protocol/impl decl sections) plus an
909914
`emit_function` refactor to reproduce the synthetic method transforms (inject

docs/self-hosting-stress-test-plan.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -285,7 +285,7 @@ materialized). Parity harness: `ast_parity_tiny_sample` + `ast_parity_samples`
285285
count still clears the floor). That corpus gate runs the reg-VM over ~570 files and
286286
is slow in a debug build — run it in `--release` for a quick measurement (~100s);
287287
the fast non-ignored inner-loop gate is `ast_parity_samples`. Current reach:
288-
**286/576 byte-exact (AST structure), 0 run-failures** (the producer never crashes; unsupported
288+
**339/579 byte-exact (AST structure), 0 run-failures** (the producer never crashes; unsupported
289289
constructs mismatch rather than panic), roughly doubled this session via ratcheted
290290
milestones: base fns 58 → declarations 121 → match 178 → generic calls 225 →
291291
closures 239 → for/literals 242 → unary/negative 245. Covered: fns (generics/

0 commit comments

Comments
 (0)