fix(gen-zig): campaign finale -- 68/68 tri-net specs produce valid Zig - #1918
Merged
Conversation
… shadow-aware dead-local scan
Final four Zig-backend validity fixes: ExprArrayLiteral stores its element
text in extra_size with no children -- emit '.{ e1, e2 }' / '.{ v } ** n'
(paren-aware top-level comma split), coercing to the typed array target;
'_cse*' temp declarations hoist to the top of fn bodies (the CSE pass can
leave them after first use in this backend's order; the Rust path already
hoists); uninitialized locals emit '= undefined'; and the dead-local
post-pass stops counting at a REDECLARATION of the name (a later
'const name = ...' is a new binding, not a use). tri-net zig ast-check
goes 3/68 -> 0/68 invalid -- the campaign that began at 66/68 invalid is
complete. Unit suite 1537/1537; gen-rust byte-identical; FROZEN_HASH
resealed.
Closes #1910
Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gHashTag
enabled auto-merge (squash)
August 8, 2026 07:35
Contributor
Contributor
|
📓 NotebookLM Notebook linked to this PR
This notebook contains session context, decisions, and artifacts for this work. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
The final four Zig-backend validity fixes, closing the campaign tracked in #1910 (66/68 invalid at the start, 0/68 now):
extra_sizewith no children; the Zig emitter now lowers it to.{ e1, e2 }/.{ v } ** n(paren-aware top-level comma split), which coerce to the typed array target._cse*temp declarations hoist to the top of fn bodies -- the CSE pass can leave them after their first use in this backend's statement order (the Rust path already hoists), and Zig resolves locals lexically.= undefined(Zig has no uninitialized declarations).const name = ...is a new binding, not a use (it previously kept genuinely-dead first bindings undischarged).Validation: full 68-spec sweep 0 failures under
zig ast-check(0.15.2); unit suite 1537/1537 (== master); gen-rust byte-identical; FROZEN_HASH resealed; NOW.md + docs/NOW.md updated. tri-net follow-up commits gen/zig and restores its Zig drift leg.Closes #1910
🤖 Generated with Claude Code