Skip to content

feat(t27b): bench prose clauses lower to nothing; scalar fields set from a call - #6293

Merged
gHashTag merged 1 commit into
masterfrom
claude/t27b-stmtexpr
Oct 4, 2026
Merged

gHashTag merged 1 commit into
masterfrom
claude/t27b-stmtexpr

Conversation

@gHashTag

@gHashTag gHashTag commented Oct 4, 2026 •

Copy link
Copy Markdown
Owner

Closes #6291
Refs #6063

What

StmtExpr led the greedy order (+28 files) after #6289. Read per file it is three unrelated shapes; this PR takes the largest:

shape files here
empty statement: bench prose clause (measure: ..., target: < 100ns) 89 lowered to nothing inside a bench, as t27c does
statement at top level, outside any fn or test 8 still rejected
stray .b from a dotted module a.b; 7 still rejected (#6102)
  • The front-end keeps a prose clause as a childless StmtExpr named <clause>:; t27c's Zig backend writes // NOT LOWERED: empty statement -- statement rendered to nothing (T43) inside a bench_<name> fn nothing calls. t27b lowers it to nothing only inside a bench body; outside one it stays a named rejection, so no test clause can be dropped silently.
  • Unblocking those files exposed two JIT/interpreter mismatches (gf16_dot4.t27, d6_test.t27). Cause: in Lower::init, a scalar struct field initialised from a call (Out{ .result = mul(a, b) }) took the in-place path meant for an aggregate result (the call got a result pointer and the field was never written). in_place now requires is_agg(&t). Fixed here because the family cannot land with a mismatch.

Tests

  • differential::bench_prose_clauses_lower_to_nothing
  • source::struct_field_initialised_from_a_scalar_call (negative control: fails with the old in_place)
  • cargo test -p t27b --release: all green.

t27b corpus specs (master 47621f4 vs this branch, local, load avg ~16-20)

before after
pass 223 246
pass_vacuous 279 279
fail 3 4
rejected 711 687
front-end error 40 40
mismatch 0 0

24 files changed verdict, checked one by one with t27c test-report (t27c built from the same master):

Greedy top 5 after: StmtAssign(undeclared) +24, ExprCall(assert with message) +19, ExprIdentifier statement +18, FnDecl +15, ExprBinary statement +12. The remaining StmtExpr (15 files: top-level statements and dotted module names) drops to greedy step 30 (+7).

The ratchet ledger docs/reports/t27b_expectations.json is not touched here; the steward blesses it.

🤖 Generated with Claude Code

…rom a call

A bench written as prose clauses (`measure: nanoseconds to f(x)`,
`target: < 100ns`) reaches lowering as childless StmtExpr nodes named
`<clause>:`. t27c's Zig backend writes `// NOT LOWERED: empty statement`
for each inside a bench fn nothing calls; t27b now lowers them to nothing
inside a bench body and keeps rejecting them anywhere else. This is the
largest of three unrelated StmtExpr shapes (89 of 104 files); top-level
statements and the dotted-module stray `.b` stay rejected.

Unblocking those files exposed two JIT/interpreter mismatches: a scalar
struct field initialised from a call took the in-place path meant for an
aggregate result and was never written. Lower::init now builds in place
only for an aggregate type.

Corpus: pass 223 -> 246, fail 3 -> 4 (gf16_dot4, same as the reference),
rejected 711 -> 687, mismatch 0.

Closes #6291

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
@github-actions

github-actions Bot commented Oct 4, 2026

Copy link
Copy Markdown
Contributor

PR Dashboard

Generated at: 2026-10-04 22:19:56 UTC

Summary

Status Count
Total Open PRs 44
PRs with Failing Checks 32
PRs with All Checks Green 12
READY 11
FAILING 32
PENDING 0
NO CHECKS YET 0

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

Seal Status

  • ⚠️ STALE -- sha256(compiler.rs)=8597b6ded596 != 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 e2fb1d8 into master Oct 4, 2026
31 of 33 checks passed
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.

t27b: bench prose clauses (StmtExpr, empty statement) lower to nothing

1 participant