Skip to content

fix(codegen): support typed integer indices and restore strict Clippy - #569

Merged
LunaStev merged 4 commits into
wavefnd:masterfrom
LunaStev:fix/integer-index-lowering
Sep 10, 2026
Merged

LunaStev merged 4 commits into
wavefnd:masterfrom
LunaStev:fix/integer-index-lowering

Conversation

@LunaStev

@LunaStev LunaStev commented Sep 10, 2026 •

Copy link
Copy Markdown
Member

Array and pointer indices such as values[next()] and values[(i * 2) - 1] are currently rejected even when they produce integers. Lower these operands through the normal expression path, preserving HIR identity and signedness before adapting the index to the target pointer width. Reads, stores, input destinations, address-of operations, and constant projections now share the same index handling.

Add regressions for evaluation count, negative pointer offsets within an allocation, unsigned extension, 32/64-bit targets, and source diagnostics for noninteger indices. Add a new executable example with a regression check. Remove three redundant closures in async lowering so strict Clippy passes without warning suppression.

Repair CI blockers exposed by the test run: evaluate pointer-returning calls when storing through a dereference, place task target attributes on separate lines, replace reserved identifiers in two cases, and verify Linux event IR against native kernel syscalls. Read the LoongArch workload expectation from the case manifest. Preserve native Windows ARM64 compiler exit codes and enable codegen phase diagnostics for the unresolved native crash.

Closes #436
Closes #543
Closes #544
Closes #503
Related: #493, #505

Validation

Passed locally on Linux amd64:

  • Formatting, std policy, strict workspace/all-target Clippy, warning-free workspace rustdoc, and diff whitespace checks.
  • Locked release build and full workspace/all-target tests, including all 73 codegen regressions.
  • Actual tests with --no-default-features --features llvm-target-core64, including all 65 enabled codegen regressions.
  • Python syntax checks, 22 tooling tests, and the 37-target case manifest.
  • All 276 example/stdlib sources and all 26 executable std examples.
  • All 607 case sources through frontend checking.

The local Linux amd64 runtime suite passed 147 of 148 cases without skips. Its HTTP server test encountered an existing service on port 8080 and received that service's response; this run cannot validate that server case. Network-dependent Rust and std tests passed with local socket access enabled.

The CI run at head 834368d33f2595dfb8db1ef48dc2cd9e6850dade completed with 22 successful / 4 failed checks. Remaining work is tracked separately:

Further implementation is paused at the maintainer's request. No tests were removed or newly skipped to hide these failures.

Evaluate index operands through normal expression lowering while preserving
HIR identity, integer signedness, and target pointer width. Share the path
across indexed reads, writes, input destinations, and constant projections.

Remove the frontend restriction on integer expression shapes and add
regressions for evaluation count, diagnostics, and 32/64-bit targets.
Add a new executable example with a regression check.

Fixes wavefnd#436

Signed-off-by: LunaStev <[email protected]>
Pass the field helper directly to map_or_else so strict Clippy checks pass
without warning suppression or changes to lowering behavior.

Fixes wavefnd#543

Signed-off-by: LunaStev <[email protected]>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

1 participant