fix(opt,gen-zig): typed aliases stay materialized; @"primitive" idents; unused tuple elements - #1937
Merged
Merged
Conversation
…s; unused tuple elements Closes #1936 - copy_propagate ignored the declared type of an alias local: `let lo: u16 = byte_param;` propagated the bare u8 identifier into every use, silently narrowing the arithmetic (u8 shift/add where the spec wrote u16 math -- a shift by 8 then overflows u3). The type annotation IS the t27 widening idiom, so typed aliases are no longer propagated. Affects all backends. - Value identifiers shadowing Zig primitive names (sha-round locals f16/f32/f64) now emit @"name" at every emission site; the dead-local text pass recognizes the @"name" form. - Tuple-destructure elements never read in their test block bind as `_` instead of a named const ("unused local constant"). tri-net corpus: tri_sha256 and hello pass zig test end-to-end; video_bridge / multipath_routing continue tri-net-side. FROZEN_HASH resealed; only unit red is the pre-existing bitnet_layer iverilog test. Co-Authored-By: Claude Fable 5 <noreply@anthropic.com>
gHashTag
enabled auto-merge (squash)
August 8, 2026 12:38
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.
Closes #1936
Batch five from the tri-net exec campaign:
let lo: u16 = byte_param;propagated the bare u8 identifier into every use, silently narrowing arithmetic (u8s_lo + (s_hi << 8): shift RHS overflows u3, add wraps). Typed aliases are the widening idiom and stay materialized now. Affects all backends (semantics-correcting).@"name"at every value-identifier site; dead-local pass recognizes the form._.tri-net corpus: tri_sha256 + hello pass end-to-end. Only unit red is pre-existing bitnet_layer (iverilog). FROZEN_HASH resealed; NOW.md entries added.
🤖 Generated with Claude Code