Skip to content

gen-zig: the dead-const pass no longer ends a block at an unindented break; (Closes #8565) - #8566

Merged
gHashTag merged 2 commits into
masterfrom
claude/gen-zig-dead-const-break
Oct 10, 2026
Merged

gHashTag merged 2 commits into
masterfrom
claude/gen-zig-dead-const-break

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 10, 2026 •

Copy link
Copy Markdown
Owner

Closes #8565

The pass that emits _ = name; // dead after const-inlining decides deadness by scanning to the next column-0 line. gen-zig emits break; and continue; unindented, so the scan stopped at the first break;. A use after the loop was missed, and Zig refused the discard: pointless discard of local constant.

Fix: a column-0 break; or continue; no longer starts a top-level block. One line in compiler.rs; FROZEN_HASH moves with it. Re-indenting break; would also fix it, but would change the Zig output, and so the seal hash, of every spec with a break.

Measured over every spec

Part of epic #8095 (P7, #8393).

🤖 Generated with Claude Code

@gHashTag
gHashTag enabled auto-merge (squash) October 10, 2026 12:49
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-10 12:52:50 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 49
PRs with All Checks Green 1
READY 0
FAILING 49
PENDING 0
NO CHECKS YET 0

These columns do not partition: 0 + 49 + 0 + 0 = 49, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=e2e342a729fe != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

claude and others added 2 commits October 10, 2026 19:54
…break; (Closes #8565)

The pass that emits _ = name; // dead after const-inlining scanned to the next
column-0 line, and gen-zig emits break; and continue; unindented, so a use
after a loop's break was never seen and Zig refused the discard of a used
const. A column-0 break;/continue; no longer starts a block. Gen output
changes in 10 specs, each only by removed discard lines; all 10 were
blocked and stay blocked (lexer, router and hybrid_bigint move past this
error). Their seals are refreshed blocked -> blocked. Corpus ratchet: the 5
inherited failures of master (#8562), none new; types ratchet CLEAN.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
#8565)

compiler/parser/parser.t27 and contrib/.../main_zig_handwritten.t27 change
only by removed discard lines too; the first measurement covered specs/
alone. Seal coverage: OK (2154 hold).

Closes #8565

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@gHashTag
gHashTag force-pushed the claude/gen-zig-dead-const-break branch from e1409f5 to 1e59862 Compare October 10, 2026 12:55
@github-actions

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-10 12:58:08 UTC

Summary

Status Count
Total Open PRs 50
PRs with Failing Checks 49
PRs with All Checks Green 1
READY 0
FAILING 49
PENDING 0
NO CHECKS YET 0

These columns do not partition: 0 + 49 + 0 + 0 = 49, and there are 50 open PRs. A PR is being counted twice or not at all.

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=e2e342a729fe != manifest seal=87e5cbd3ad94.
    The committed NMSE numbers were certified against an older compiler.rs.
    Run scripts/reseal-check.sh locally for the two-step reseal command (advisory; not a merge gate).

@gHashTag
gHashTag merged commit e735c23 into master Oct 10, 2026
34 of 41 checks passed
gHashTag added a commit that referenced this pull request Oct 10, 2026
…ariants compare tags (Closes #8578) (#8583)

check_keyword takes the [256]u8 lexeme buffer a Token carries; the 8
keyword tests passed string literals. A spec helper lexeme_buf(s) builds
that buffer, and the tests use it: same keywords, same TokenKinds. The
invariants compared an enum to an integer; they compare its tag now.
16/16, 0 vacuous, on top of #8566. Resealed v2 on both seal files.

Co-authored-by: Claude <claude@anthropic.com>
Co-authored-by: Claude Opus 5.5 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

gen-zig: the dead-const pass ends a block at an unindented break; and discards consts that are used

2 participants